# Functions
AddContext wraps an error in a context.
CalculateLeaves calculates the number of leaves that would be pushed from data of size 'dataSize'.
ComposeErrors combines several errors in one.
ContainsError checks if one error contains the other.
DecodePriceTable decodes the host's price table.
DecodeSettings decodes the host's settings.
EncodePriceTable encodes the host's price table.
EncodeSettings encodes the host's settings.
EqualIPNets checks if two slices of IP subnets contain the same subnets.
FromFloat converts f Siacoins to a types.Currency value.
IsLocal returns true if the input IP address belongs to a local address range such as 192.168.x.x or 127.x.x.x.
IsLoopback returns true for IP addresses that are on the same machine.
IsStdValid returns an error if the NetAddress is invalid.
IsValid is an extension to IsStdValid that also forbids the loopback address.
LookupIPNets returns string representations of the CIDR subnets.
MulFloat multiplies a types.Currency by a float64 value.
NewTree returns a MerkleTree, which can be used for getting Merkle roots and Merkle proofs on data.
PeekErr checks if a chan error has an error waiting to be returned.
VerifyRangeProof verifies a proof produced by MerkleRangeProof.
VerifySegment will verify that a segment, given the proof, is a part of a Merkle root.
# Constants
SegmentSize is the chunk size that is used when taking the Merkle root of a file.
# Structs
MerkleTree wraps merkletree.Tree, changing some of the function definitions to assume sia-specific constants and return sia-specific types.