Documentation
¶
Index ¶
- Variables
- func NewMockPeerManagerWithDefaultPeer() (*mockPeerManager, *mock.Peer)
- func PreloadSignatures(ctx context.Context, out chan crypto.Signature, p sendMessage, ...) error
- func RunNode(ctx context.Context, n *Node, p peer.Parent)
- type BlockApplier
- type BlockWithBytes
- type Config
- type MockStateManager
- func (a *MockStateManager) AccountBalance(account proto.Recipient, asset []byte) (uint64, error)
- func (a *MockStateManager) ActivationHeight(featureID int16) (uint64, error)
- func (a *MockStateManager) AddBlock([]byte) (*proto.Block, error)
- func (a *MockStateManager) AddBlocks(blocks [][]byte, initialisation bool) error
- func (a *MockStateManager) AddDeserializedBlock(block *proto.Block) (*proto.Block, error)
- func (a *MockStateManager) AddNewBlocks(blocks [][]byte) error
- func (a *MockStateManager) AddNewDeserializedBlocks(blocks []*proto.Block) error
- func (a *MockStateManager) AddOldBlocks(blocks [][]byte) error
- func (a *MockStateManager) AddOldDeserializedBlocks([]*proto.Block) error
- func (a *MockStateManager) AddingBlockHeight() (proto.Height, error)
- func (a *MockStateManager) AddrByAlias(alias proto.Alias) (proto.Address, error)
- func (a *MockStateManager) AddressesNumber(wavesonly bool) (uint64, error)
- func (a *MockStateManager) ApprovalHeight(featureID int16) (uint64, error)
- func (a *MockStateManager) AssetInfo(assetID crypto.Digest) (*proto.AssetInfo, error)
- func (a *MockStateManager) AssetIsSponsored(assetID crypto.Digest) (bool, error)
- func (a *MockStateManager) Block(blockID crypto.Signature) (*proto.Block, error)
- func (a *MockStateManager) BlockByHeight(height proto.Height) (*proto.Block, error)
- func (a *MockStateManager) BlockBytes(blockID crypto.Signature) ([]byte, error)
- func (a *MockStateManager) BlockBytesByHeight(height proto.Height) ([]byte, error)
- func (a *MockStateManager) BlockIDToHeight(blockID crypto.Signature) (uint64, error)
- func (a *MockStateManager) BlockchainSettings() (*settings.BlockchainSettings, error)
- func (a *MockStateManager) Close() error
- func (a *MockStateManager) CurrentScore() (*big.Int, error)
- func (a *MockStateManager) EffectiveBalance(account proto.Recipient, startHeight, endHeight uint64) (uint64, error)
- func (a *MockStateManager) Header(block crypto.Signature) (*proto.BlockHeader, error)
- func (a *MockStateManager) HeaderByHeight(height uint64) (*proto.BlockHeader, error)
- func (a *MockStateManager) HeaderBytes(blockID crypto.Signature) ([]byte, error)
- func (a *MockStateManager) HeaderBytesByHeight(height uint64) ([]byte, error)
- func (a *MockStateManager) Height() (proto.Height, error)
- func (a *MockStateManager) HeightToBlockID(height uint64) (crypto.Signature, error)
- func (a *MockStateManager) IsActivated(featureID int16) (bool, error)
- func (a *MockStateManager) IsApproved(featureID int16) (bool, error)
- func (a *MockStateManager) IsNotFound(err error) bool
- func (a *MockStateManager) Mutex() *lock.RwMutex
- func (a *MockStateManager) NewestAccountBalance(account proto.Recipient, asset []byte) (uint64, error)
- func (a *MockStateManager) NewestAddrByAlias(alias proto.Alias) (proto.Address, error)
- func (a *MockStateManager) NewestAssetInfo(assetID crypto.Digest) (*proto.AssetInfo, error)
- func (a *MockStateManager) NewestAssetIsSponsored(assetID crypto.Digest) (bool, error)
- func (a *MockStateManager) NewestHeaderByHeight(height uint64) (*proto.BlockHeader, error)
- func (a *MockStateManager) NewestHeight() (proto.Height, error)
- func (a *MockStateManager) NewestTransactionByID(id []byte) (proto.Transaction, error)
- func (a *MockStateManager) NewestTransactionHeightByID(id []byte) (proto.Height, error)
- func (a *MockStateManager) Peers() ([]proto.TCPAddr, error)
- func (a *MockStateManager) ResetValidationList()
- func (a *MockStateManager) RetrieveBinaryEntry(account proto.Recipient, key string) (*proto.BinaryDataEntry, error)
- func (a *MockStateManager) RetrieveBooleanEntry(account proto.Recipient, key string) (*proto.BooleanDataEntry, error)
- func (a *MockStateManager) RetrieveEntry(account proto.Recipient, key string) (proto.DataEntry, error)
- func (a *MockStateManager) RetrieveIntegerEntry(account proto.Recipient, key string) (*proto.IntegerDataEntry, error)
- func (a *MockStateManager) RetrieveNewestBinaryEntry(account proto.Recipient, key string) (*proto.BinaryDataEntry, error)
- func (a *MockStateManager) RetrieveNewestBooleanEntry(account proto.Recipient, key string) (*proto.BooleanDataEntry, error)
- func (a *MockStateManager) RetrieveNewestEntry(account proto.Recipient, key string) (proto.DataEntry, error)
- func (a *MockStateManager) RetrieveNewestIntegerEntry(account proto.Recipient, key string) (*proto.IntegerDataEntry, error)
- func (a *MockStateManager) RetrieveNewestStringEntry(account proto.Recipient, key string) (*proto.StringDataEntry, error)
- func (a *MockStateManager) RetrieveStringEntry(account proto.Recipient, key string) (*proto.StringDataEntry, error)
- func (a *MockStateManager) RollbackTo(removalEdge crypto.Signature) error
- func (a *MockStateManager) RollbackToHeight(height uint64) error
- func (a *MockStateManager) SavePeers([]proto.TCPAddr) error
- func (a *MockStateManager) ScoreAtHeight(height uint64) (*big.Int, error)
- func (a *MockStateManager) TransactionByID(id []byte) (proto.Transaction, error)
- func (a *MockStateManager) TransactionHeightByID(id []byte) (proto.Height, error)
- func (a *MockStateManager) ValidateNextTx(tx proto.Transaction, currentTimestamp, parentTimestamp uint64, ...) error
- func (a *MockStateManager) WavesAddressesNumber() (uint64, error)
- type Node
- func (a *Node) AskPeers()
- func (a *Node) Close()
- func (a *Node) HandleInfoMessage(m peer.InfoMessage)
- func (a *Node) HandleProtoMessage(mess peer.ProtoMessage)
- func (a *Node) PeerManager() peer_manager.PeerManager
- func (a *Node) Serve(ctx context.Context) error
- func (a *Node) SpawnOutgoingConnection(ctx context.Context, addr proto.TCPAddr) error
- func (a *Node) SpawnOutgoingConnections(ctx context.Context)
- func (a *Node) State() state.State
- type Signatures
- type StateSync
- type Subscribe
Constants ¶
This section is empty.
Variables ¶
View Source
var NothingToRequestErr = errors.New("nothing ot request")
View Source
var TimeoutErr = errors.New("timeout")
Functions ¶
func PreloadSignatures ¶
Types ¶
type BlockApplier ¶
type BlockApplier struct {
// contains filtered or unexported fields
}
func NewBlockApplier ¶
func (*BlockApplier) Apply ¶
func (a *BlockApplier) Apply(block *proto.Block) error
1) interrupt miner 2) notify peers about score 3) reshedule
func (*BlockApplier) ApplyBytes ¶
func (a *BlockApplier) ApplyBytes(b []byte) error
type BlockWithBytes ¶
type MockStateManager ¶
func NewMockStateManager ¶
func NewMockStateManager(blocks ...*proto.Block) (*MockStateManager, error)
func (*MockStateManager) AccountBalance ¶
func (*MockStateManager) ActivationHeight ¶
func (a *MockStateManager) ActivationHeight(featureID int16) (uint64, error)
func (*MockStateManager) AddBlock ¶
func (a *MockStateManager) AddBlock([]byte) (*proto.Block, error)
func (*MockStateManager) AddBlocks ¶
func (a *MockStateManager) AddBlocks(blocks [][]byte, initialisation bool) error
func (*MockStateManager) AddDeserializedBlock ¶
func (*MockStateManager) AddNewBlocks ¶
func (a *MockStateManager) AddNewBlocks(blocks [][]byte) error
func (*MockStateManager) AddNewDeserializedBlocks ¶
func (a *MockStateManager) AddNewDeserializedBlocks(blocks []*proto.Block) error
func (*MockStateManager) AddOldBlocks ¶
func (a *MockStateManager) AddOldBlocks(blocks [][]byte) error
func (*MockStateManager) AddOldDeserializedBlocks ¶
func (a *MockStateManager) AddOldDeserializedBlocks([]*proto.Block) error
func (*MockStateManager) AddingBlockHeight ¶
func (a *MockStateManager) AddingBlockHeight() (proto.Height, error)
func (*MockStateManager) AddrByAlias ¶
func (*MockStateManager) AddressesNumber ¶
func (a *MockStateManager) AddressesNumber(wavesonly bool) (uint64, error)
func (*MockStateManager) ApprovalHeight ¶
func (a *MockStateManager) ApprovalHeight(featureID int16) (uint64, error)
func (*MockStateManager) AssetIsSponsored ¶
func (a *MockStateManager) AssetIsSponsored(assetID crypto.Digest) (bool, error)
func (*MockStateManager) BlockByHeight ¶
func (*MockStateManager) BlockBytes ¶
func (a *MockStateManager) BlockBytes(blockID crypto.Signature) ([]byte, error)
func (*MockStateManager) BlockBytesByHeight ¶
func (a *MockStateManager) BlockBytesByHeight(height proto.Height) ([]byte, error)
func (*MockStateManager) BlockIDToHeight ¶
func (a *MockStateManager) BlockIDToHeight(blockID crypto.Signature) (uint64, error)
func (*MockStateManager) BlockchainSettings ¶
func (a *MockStateManager) BlockchainSettings() (*settings.BlockchainSettings, error)
func (*MockStateManager) Close ¶
func (a *MockStateManager) Close() error
func (*MockStateManager) CurrentScore ¶
func (a *MockStateManager) CurrentScore() (*big.Int, error)
func (*MockStateManager) EffectiveBalance ¶
func (*MockStateManager) Header ¶
func (a *MockStateManager) Header(block crypto.Signature) (*proto.BlockHeader, error)
func (*MockStateManager) HeaderByHeight ¶
func (a *MockStateManager) HeaderByHeight(height uint64) (*proto.BlockHeader, error)
func (*MockStateManager) HeaderBytes ¶
func (a *MockStateManager) HeaderBytes(blockID crypto.Signature) ([]byte, error)
func (*MockStateManager) HeaderBytesByHeight ¶
func (a *MockStateManager) HeaderBytesByHeight(height uint64) ([]byte, error)
func (*MockStateManager) HeightToBlockID ¶
func (a *MockStateManager) HeightToBlockID(height uint64) (crypto.Signature, error)
func (*MockStateManager) IsActivated ¶
func (a *MockStateManager) IsActivated(featureID int16) (bool, error)
func (*MockStateManager) IsApproved ¶
func (a *MockStateManager) IsApproved(featureID int16) (bool, error)
func (*MockStateManager) IsNotFound ¶
func (a *MockStateManager) IsNotFound(err error) bool
func (*MockStateManager) Mutex ¶
func (a *MockStateManager) Mutex() *lock.RwMutex
func (*MockStateManager) NewestAccountBalance ¶
func (*MockStateManager) NewestAddrByAlias ¶
func (*MockStateManager) NewestAssetInfo ¶
func (*MockStateManager) NewestAssetIsSponsored ¶
func (a *MockStateManager) NewestAssetIsSponsored(assetID crypto.Digest) (bool, error)
func (*MockStateManager) NewestHeaderByHeight ¶
func (a *MockStateManager) NewestHeaderByHeight(height uint64) (*proto.BlockHeader, error)
func (*MockStateManager) NewestHeight ¶
func (a *MockStateManager) NewestHeight() (proto.Height, error)
func (*MockStateManager) NewestTransactionByID ¶
func (a *MockStateManager) NewestTransactionByID(id []byte) (proto.Transaction, error)
func (*MockStateManager) NewestTransactionHeightByID ¶
func (a *MockStateManager) NewestTransactionHeightByID(id []byte) (proto.Height, error)
func (*MockStateManager) ResetValidationList ¶
func (a *MockStateManager) ResetValidationList()
func (*MockStateManager) RetrieveBinaryEntry ¶
func (a *MockStateManager) RetrieveBinaryEntry(account proto.Recipient, key string) (*proto.BinaryDataEntry, error)
func (*MockStateManager) RetrieveBooleanEntry ¶
func (a *MockStateManager) RetrieveBooleanEntry(account proto.Recipient, key string) (*proto.BooleanDataEntry, error)
func (*MockStateManager) RetrieveEntry ¶
func (*MockStateManager) RetrieveIntegerEntry ¶
func (a *MockStateManager) RetrieveIntegerEntry(account proto.Recipient, key string) (*proto.IntegerDataEntry, error)
func (*MockStateManager) RetrieveNewestBinaryEntry ¶
func (a *MockStateManager) RetrieveNewestBinaryEntry(account proto.Recipient, key string) (*proto.BinaryDataEntry, error)
func (*MockStateManager) RetrieveNewestBooleanEntry ¶
func (a *MockStateManager) RetrieveNewestBooleanEntry(account proto.Recipient, key string) (*proto.BooleanDataEntry, error)
func (*MockStateManager) RetrieveNewestEntry ¶
func (*MockStateManager) RetrieveNewestIntegerEntry ¶
func (a *MockStateManager) RetrieveNewestIntegerEntry(account proto.Recipient, key string) (*proto.IntegerDataEntry, error)
func (*MockStateManager) RetrieveNewestStringEntry ¶
func (a *MockStateManager) RetrieveNewestStringEntry(account proto.Recipient, key string) (*proto.StringDataEntry, error)
func (*MockStateManager) RetrieveStringEntry ¶
func (a *MockStateManager) RetrieveStringEntry(account proto.Recipient, key string) (*proto.StringDataEntry, error)
func (*MockStateManager) RollbackTo ¶
func (a *MockStateManager) RollbackTo(removalEdge crypto.Signature) error
func (*MockStateManager) RollbackToHeight ¶
func (a *MockStateManager) RollbackToHeight(height uint64) error
func (*MockStateManager) ScoreAtHeight ¶
func (a *MockStateManager) ScoreAtHeight(height uint64) (*big.Int, error)
func (*MockStateManager) TransactionByID ¶
func (a *MockStateManager) TransactionByID(id []byte) (proto.Transaction, error)
func (*MockStateManager) TransactionHeightByID ¶
func (a *MockStateManager) TransactionHeightByID(id []byte) (proto.Height, error)
func (*MockStateManager) ValidateNextTx ¶
func (a *MockStateManager) ValidateNextTx(tx proto.Transaction, currentTimestamp, parentTimestamp uint64, version proto.BlockVersion) error
func (*MockStateManager) WavesAddressesNumber ¶
func (a *MockStateManager) WavesAddressesNumber() (uint64, error)
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func NewNode ¶
func NewNode(services services.Services, declAddr proto.TCPAddr, ng *ng.RuntimeImpl, interrupter types.MinerInterrupter) *Node
func (*Node) HandleInfoMessage ¶
func (a *Node) HandleInfoMessage(m peer.InfoMessage)
func (*Node) HandleProtoMessage ¶
func (a *Node) HandleProtoMessage(mess peer.ProtoMessage)
func (*Node) PeerManager ¶
func (a *Node) PeerManager() peer_manager.PeerManager
func (*Node) SpawnOutgoingConnection ¶
func (*Node) SpawnOutgoingConnections ¶
type Signatures ¶
type Signatures struct {
// contains filtered or unexported fields
}
func LastSignatures ¶
func LastSignatures(state state.State) (*Signatures, error)
func NewSignatures ¶
func NewSignatures(signatures ...crypto.Signature) *Signatures
func (*Signatures) Revert ¶
func (a *Signatures) Revert() *Signatures
func (*Signatures) Signatures ¶
func (a *Signatures) Signatures() []crypto.Signature
type StateSync ¶
type StateSync struct {
// contains filtered or unexported fields
}
func NewStateSync ¶
type Subscribe ¶
type Subscribe struct {
// contains filtered or unexported fields
}
func NewSubscribeService ¶
func NewSubscribeService() *Subscribe
Source Files
¶
Click to show internal directories.
Click to hide internal directories.