Documentation ¶
Overview ¶
wire implements the network logic for transactions that include the utreexo accumulator proofs
Index ¶
- func BlockToAddLeaves(blk *btcutil.Block, remember []bool, skiplist []uint32, height int32, ...) (leaves []accumulator.Leaf)
- func UblockNetworkReader(blockChan chan UBlock, remoteServer string, curHeight, lookahead int32)
- type UBlock
- func (ub *UBlock) CheckBlock(outskip []uint32, p *chaincfg.Params) bool
- func (ub *UBlock) Deserialize(r io.Reader) (err error)
- func (ub *UBlock) ProofSanity(nl uint64, h uint8) error
- func (ub *UBlock) Serialize(w io.Writer) (err error)
- func (ub *UBlock) SerializeSize() int
- func (ub *UBlock) ToUtxoView() *blockchain.UtxoViewpoint
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockToAddLeaves ¶
func BlockToAddLeaves( blk *btcutil.Block, remember []bool, skiplist []uint32, height int32, outCount uint32) (leaves []accumulator.Leaf)
BlockToAdds turns all the new utxos in a msgblock into leafTxos uses remember slice up to number of txos, but doesn't check that it's the right length. Similar with skiplist, doesn't check it.
func UblockNetworkReader ¶
UblockNetworkReader gets Ublocks from the remote host and puts em in the channel. It'll try to fill the channel buffer.
Types ¶
type UBlock ¶
UBlock is a regular block, with Udata stuck on
func (*UBlock) CheckBlock ¶
CheckBlock does all internal block checks for a UBlock right now checks the signatures
func (*UBlock) Deserialize ¶
Deserialize a UBlock. It's just a block then udata.
func (*UBlock) ProofSanity ¶
ProofSanity checks the consistency of a UBlock. Does the proof prove all the inputs in the block?
func (*UBlock) Serialize ¶
We don't actually call serialize since from the server side we don't serialize, we just glom stuff together from the disk and send it over.
func (*UBlock) SerializeSize ¶
SerializeSize: how big is it, in bytes.
func (*UBlock) ToUtxoView ¶
func (ub *UBlock) ToUtxoView() *blockchain.UtxoViewpoint
ToUtxoView converts a UData into a btcd blockchain.UtxoViewpoint all the data is there, just a bit different format. Note that this needs blockchain.NewUtxoEntry() in btcd