AddKnownInventory adds the passed inventory to the cache of known inventory for the peer.
This function is safe for concurrent access.
// Add the inventory to the cache of known inventory // for the peer. imsg.peer.AddKnownInventory(iv) // Ignore inventory when we're in headers-first mode.
tx := btcutil.NewTx(msg) iv := wire.NewInvVect(wire.InvTypeTx, tx.Hash()) p.AddKnownInventory(iv) // Queue the transaction up to be handled by the block manager and
// Add the block to the known inventory for the peer. iv := wire.NewInvVect(wire.InvTypeBlock, block.Hash()) p.AddKnownInventory(iv) // Queue the block up to be handled by the block
AddKnownInventory is referenced in 2 repositoriesgithub.com/btcsuite/btcd
- 2 references in server.go
- 1 reference in blockmanager.go
- 1 reference in peer/peer.go
- 1 reference in peer/peer_test.go
p.flagsMtx.Lock() id := p.id