Documentation ¶
Index ¶
- func IPv4Addr() string
- func InitNode() Noder
- func NewNode() *node
- func NonTLSDial(nodeAddr string) (net.Conn, error)
- func TLSDial(nodeAddr string) (net.Conn, error)
- type ConnectingNodes
- type KnownAddress
- type KnownAddressList
- func (al *KnownAddressList) AddAddressToKnownAddress(na NodeAddr)
- func (al *KnownAddressList) AddressExisted(uid uint64) bool
- func (al *KnownAddressList) DelAddressFromList(id uint64) bool
- func (al *KnownAddressList) GetAddressCnt() uint64
- func (al *KnownAddressList) NeedMoreAddresses() bool
- func (al *KnownAddressList) RandGetAddresses(nbrAddrs []NodeAddr) []NodeAddr
- func (al *KnownAddressList) RandSelectAddresses() []NodeAddr
- func (al *KnownAddressList) UpdateAddress(id uint64, na NodeAddr)
- func (al *KnownAddressList) UpdateLastDisconn(id uint64)
- type Semaphore
- type TXNPool
- func (this *TXNPool) AppendToTxnPool(txn *transaction.Transaction) ErrCode
- func (this *TXNPool) CleanSubmittedTransactions(block *ledger.Block) error
- func (this *TXNPool) GetTransaction(hash common.Uint256) *transaction.Transaction
- func (this *TXNPool) GetTransactionCount() int
- func (this *TXNPool) GetTxnPool(byCount bool) map[common.Uint256]*transaction.Transaction
- func (this *TXNPool) MaybeAcceptTransaction(txn *tx.Transaction) error
- func (this *TXNPool) RemoveTransaction(txn *tx.Transaction)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConnectingNodes ¶
type KnownAddress ¶
type KnownAddress struct {
// contains filtered or unexported fields
}
func (*KnownAddress) GetID ¶
func (ka *KnownAddress) GetID() uint64
func (*KnownAddress) LastAttempt ¶
func (ka *KnownAddress) LastAttempt() time.Time
func (*KnownAddress) NetAddress ¶
func (ka *KnownAddress) NetAddress() NodeAddr
func (*KnownAddress) SaveAddr ¶
func (ka *KnownAddress) SaveAddr(na NodeAddr)
type KnownAddressList ¶
type KnownAddressList struct { sync.RWMutex List map[uint64]*KnownAddress // contains filtered or unexported fields }
func (*KnownAddressList) AddAddressToKnownAddress ¶
func (al *KnownAddressList) AddAddressToKnownAddress(na NodeAddr)
func (*KnownAddressList) AddressExisted ¶
func (al *KnownAddressList) AddressExisted(uid uint64) bool
func (*KnownAddressList) DelAddressFromList ¶
func (al *KnownAddressList) DelAddressFromList(id uint64) bool
func (*KnownAddressList) GetAddressCnt ¶
func (al *KnownAddressList) GetAddressCnt() uint64
func (*KnownAddressList) NeedMoreAddresses ¶
func (al *KnownAddressList) NeedMoreAddresses() bool
func (*KnownAddressList) RandGetAddresses ¶
func (al *KnownAddressList) RandGetAddresses(nbrAddrs []NodeAddr) []NodeAddr
func (*KnownAddressList) RandSelectAddresses ¶
func (al *KnownAddressList) RandSelectAddresses() []NodeAddr
func (*KnownAddressList) UpdateAddress ¶
func (al *KnownAddressList) UpdateAddress(id uint64, na NodeAddr)
func (*KnownAddressList) UpdateLastDisconn ¶
func (al *KnownAddressList) UpdateLastDisconn(id uint64)
type TXNPool ¶
func (*TXNPool) AppendToTxnPool ¶
func (this *TXNPool) AppendToTxnPool(txn *transaction.Transaction) ErrCode
append transaction to txnpool when check ok. 1.check transaction. 2.check with ledger(db) 3.check with pool
func (*TXNPool) CleanSubmittedTransactions ¶
clean the trasaction Pool with committed block.
func (*TXNPool) GetTransaction ¶
func (this *TXNPool) GetTransaction(hash common.Uint256) *transaction.Transaction
get the transaction by hash
func (*TXNPool) GetTransactionCount ¶
func (*TXNPool) GetTxnPool ¶
func (this *TXNPool) GetTxnPool(byCount bool) map[common.Uint256]*transaction.Transaction
get the transaction in txnpool
func (*TXNPool) MaybeAcceptTransaction ¶
func (this *TXNPool) MaybeAcceptTransaction(txn *tx.Transaction) error
func (*TXNPool) RemoveTransaction ¶
func (this *TXNPool) RemoveTransaction(txn *tx.Transaction)
Click to show internal directories.
Click to hide internal directories.