- 11 6月, 2018 1 次提交
-
-
To avoid duplicating fields and making the code easier to follow. Remove all of `FSNode` previous fields in favor on a single `pb.Data` structure that is not exported. Accessor methods are added only for the necessary internal fields. This takes up more memory, `pb.Data` is always created inside `FSNode` and it stays there instead of just being created and destroyed during the (un)marshal operations. The removed fields `Data`, `blocksizes` and `Type` had a direct counterpart in the embedded `pb.Data` structure, in contrast (only) the `subtotal` field doesn't have one, it was used as a temporary accumulator to track the `Filesize`, which is now being kept updated on every modification (to ensure the entire `FSNode` is always at a valid state), so `subtotal` could just be removed without the addition of any other field (this temporary accumulator was obscuring how `Filesize` was computed). To keep `Filesize` up to date a method was added (`UpdateFilesize()`) to adjust its value in the two places where the file size could be modified, when changing its data (in `SetData()`, accessor method added) and when adding or removing child nodes (in `AddBlockSize()` and `RemoveBlockSize()`). A constructor method was added (`NewFSNode()`) to initialize the required fields, like `Type` which is explicitly set, this deprecates the previous methodology of just calling `new(FSNode)` and relying in the default value of `pb.Data_DataType` (`Data_Raw`) to avoid an explicit assignment. Also, `Filesize` is initialized to avoid being left with a `nil` value before marshaling empty nodes, which would result in a different hash from previous versions, to be backwards compatible. Previous versions of `GetBytes()` always set the `Filesize` value, even though it is reflected as an `optional` field in the `.proto` file (this may be an inaccurate field rule). Without the duplicated fields the functions `GetBytes()` and `FSNodeFromBytes()` are now reduced to simple `Marshal()` and `Unmarshal()` operations respectively. License: MIT Signed-off-by:Lucas Molas <schomatis@gmail.com>
由 Lucas Molas 提交于
-
- 08 6月, 2018 1 次提交
-
-
Create a raw node instead of a file node when there is no content.
由 Whyrusleeping 提交于
-
- 06 6月, 2018 4 次提交
-
-
transport refactor update
由 Whyrusleeping 提交于 -
License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于 -
License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于 -
update multiplexers
由 Whyrusleeping 提交于
-
- 05 6月, 2018 5 次提交
-
-
embed public keys inside ipns records, use for validation
由 Whyrusleeping 提交于 -
License: MIT Signed-off-by:Jeromy <jeromyj@gmail.com>
由 Jeromy 提交于 -
License: MIT Signed-off-by:Jeromy <jeromyj@gmail.com>
由 Jeromy 提交于 -
License: MIT Signed-off-by:Jeromy <jeromyj@gmail.com>
由 Jeromy 提交于 -
License: MIT Signed-off-by:Jeromy <jeromyj@gmail.com>
由 Jeromy 提交于
-
- 04 6月, 2018 1 次提交
-
-
License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于
-
- 03 6月, 2018 6 次提交
-
-
only resolve dnslinks once in the gateway
由 Whyrusleeping 提交于 -
fix the duplicate (multiple versions) sys import
由 Whyrusleeping 提交于 -
License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于 -
routing fixes/refactor
由 Whyrusleeping 提交于 -
License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于 -
If the domain has a DNS-Link, we want to use it even if it points to, e.g., an IPNS address that doesn't resolve. fixes #4973 License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于
-
- 02 6月, 2018 2 次提交
-
-
License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于 -
We've added a new file to the flatfs datastore. License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于
-
- 01 6月, 2018 10 次提交
-
-
License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于 -
License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于 -
License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于 -
License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于 -
Remove ~50 lines of code, some casting, and a superfluous map (when go starts looking like python, something's wrong). License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于 -
fixes #4749 License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于 -
The current convention is to return the concrete type instead of an interface so let's go with that and have one constructor. License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于 -
License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于 -
And: * Update for DHT changes. * Switch to the new record validation system. License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于 -
License: MIT Signed-off-by:Steven Allen <steven@stebalien.com>
由 Steven Allen 提交于
-
- 31 5月, 2018 3 次提交
-
-
License: MIT Signed-off-by:Kevin Atkinson <k@kevina.org>
由 Kevin Atkinson 提交于 -
This fixes things so when raw-leaves are enabled a zero size file creates a zero size raw leaf. When raw-leaves are not enabled the hash created changes from QmbFMke1KXqnYyBBWxB74N4c5SBnJMVAiMNRcGu6x1AwQH to Qmdsf68UUYTSSx3i4GtDJfxzpAEZt7Mp23m3qa36LYMSiW, since the type field changed from TFile to TRaw. License: MIT Signed-off-by:Kevin Atkinson <k@kevina.org>
由 Kevin Atkinson 提交于 -
Warning when NoSync setting is set as it does not turn syncing off…
由 Whyrusleeping 提交于
-
- 30 5月, 2018 1 次提交
-
-
build: remove fuse platform constraints
由 Whyrusleeping 提交于
-
- 29 5月, 2018 1 次提交
-
-
License: MIT Signed-off-by:Dominic Della Valle <ddvpublic@gmail.com>
由 Dominic Della Valle 提交于
-
- 28 5月, 2018 2 次提交
-
-
License: MIT Signed-off-by:Esteban Ginez <eginez@gmail.com>
由 Esteban 提交于 -
Remove leftover bits of code.
由 Whyrusleeping 提交于
-
- 24 5月, 2018 3 次提交
-
-
fix: Reduce tree in multinode test
由 Whyrusleeping 提交于 -
Fix goroutine leaks in refs.go
由 Whyrusleeping 提交于 -
Fix goroutine leak in dag put
由 Whyrusleeping 提交于
-