Documentation
¶
Overview ¶
Router keeps track of all the chains in flight. It routes transactions to the right chain.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Chain ¶
type Chain struct { MR [][]byte // Array of hashes that represent the right edge of the Merkle tree Txs HashStream // stream of hashes going into the Merkle tree Mux sync.Mutex // Allow the chain to be locked when closing Count int64 // How many hashes we have processed. }
Structure for accepting hashes to go into a chain.
func (*Chain) CloseMR ¶
CloseMR Pad the rest of the inputs into the Merkle tree until we match a power of two.
func (*Chain) Run ¶
func (c *Chain) Run(txs HashStream)
go routine that pulls transactions out of the hashstream and pushes them into adding to the Merkle tree
type HashStream ¶
type HashStream chan []byte
Click to show internal directories.
Click to hide internal directories.