Documentation
¶
Index ¶
- Variables
- type Config
- type Node
- func (nd *Node) AfterProcessBlock(kn *kernel.Kernel, b *block.Block, s *block.ObserverSigned, ctx *data.Context)
- func (nd *Node) AfterPushTransaction(kn *kernel.Kernel, tx transaction.Transaction, sigs []common.Signature)
- func (nd *Node) Close()
- func (nd *Node) CommitTransaction(tx transaction.Transaction, sigs []common.Signature) error
- func (nd *Node) DebugLog(kn *kernel.Kernel, args ...interface{})
- func (nd *Node) DoTransactionBroadcast(kn *kernel.Kernel, msg *message_def.TransactionMessage)
- func (nd *Node) OnConnected(p mesh.Peer)
- func (nd *Node) OnDisconnected(p mesh.Peer)
- func (nd *Node) OnProcessBlock(kn *kernel.Kernel, b *block.Block, s *block.ObserverSigned, ctx *data.Context) error
- func (nd *Node) OnPushTransaction(kn *kernel.Kernel, tx transaction.Transaction, sigs []common.Signature) error
- func (nd *Node) OnRecv(p mesh.Peer, r io.Reader, t message.Type) error
- func (nd *Node) Run()
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidTimestamp = errors.New("invalid timestamp") ErrNotAllowedPublicHash = errors.New("not allowed public hash") )
errors
Functions ¶
This section is empty.
Types ¶
type Node ¶
Node validates and shares the block chain
func (*Node) AfterProcessBlock ¶
func (nd *Node) AfterProcessBlock(kn *kernel.Kernel, b *block.Block, s *block.ObserverSigned, ctx *data.Context)
AfterProcessBlock called when processed block to the chain
func (*Node) AfterPushTransaction ¶
func (nd *Node) AfterPushTransaction(kn *kernel.Kernel, tx transaction.Transaction, sigs []common.Signature)
AfterPushTransaction called when pushed a transaction to the transaction pool
func (*Node) CommitTransaction ¶
func (nd *Node) CommitTransaction(tx transaction.Transaction, sigs []common.Signature) error
CommitTransaction adds and broadcasts transaction
func (*Node) DoTransactionBroadcast ¶
func (nd *Node) DoTransactionBroadcast(kn *kernel.Kernel, msg *message_def.TransactionMessage)
DoTransactionBroadcast called when a transaction need to be broadcast
func (*Node) OnConnected ¶
OnConnected is called after a new peer is connected
func (*Node) OnDisconnected ¶
OnDisconnected is called when the peer is disconnected
func (*Node) OnProcessBlock ¶
func (nd *Node) OnProcessBlock(kn *kernel.Kernel, b *block.Block, s *block.ObserverSigned, ctx *data.Context) error
OnProcessBlock called when processing block to the chain (error prevent processing block)
func (*Node) OnPushTransaction ¶
func (nd *Node) OnPushTransaction(kn *kernel.Kernel, tx transaction.Transaction, sigs []common.Signature) error
OnPushTransaction called when pushing a transaction to the transaction pool (error prevent push transaction)
Click to show internal directories.
Click to hide internal directories.