module
neo3.network.relaycache
Local cache to hold objects for responding to GETDATA
network payloads.
Classes
RelayCache
— A cache holding transactions broadcast to the network to be included in a block.
class
neo3.network.relaycache.
RelayCache
(
*args
, **kwds
)
Bases
neo3.singleton._Singleton
A cache holding transactions broadcast to the network to be included in a block.
Will be accessed in response to a GETDATA network payload.
Methods
add
(
inventory
)
— Add an inventory to the cache.get_and_remove
(
inventory_hash
)
(Optional) — Pop an inventory from the cache if found.reset
(
)
— Empty the cache.try_get
(
inventory_hash
)
(Optional) — Get an inventory from the cache.
method
add
(
inventory
)
Add an inventory to the cache.
method
get_and_remove
(
inventory_hash
)
→ Optional
Pop an inventory from the cache if found.
method
reset
(
)
Empty the cache.
method
try_get
(
inventory_hash
)
→ Optional
Get an inventory from the cache.