bnet

package
v0.0.0-...-d80206a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SignedBlock = uos.SignedTransaction{}

Also use `uos.SignedBlock` Also use `uos.SignedTransaction`

Functions

This section is empty.

Types

type BNetMessageType

type BNetMessageType byte
const (
	HelloType                    BNetMessageType = iota // 0
	TransactionNoticeType                               // 1
	BlockNoticeType                                     // 2
	SignedBlockPointerType                              // 3
	PackedTransactionPointerType                        // 4
	PingType                                            // 5
	PongType                                            // 6
)

type BlockNotice

type BlockNotice struct {
	BlockIDs []uos.Checksum256 `json:"block_ids"`
}

*

  • From bnet_plugin.cpp's `block_notice`: *
  • This message is sent upon successfully adding a transaction to the fork database
  • and informs the remote peer that there is no need to send this block.

type Hello

type Hello struct {
	PeerID                   ecc.PublicKey     `json:"peer_id"`
	NetworkVersion           string            `json:"network_version"`
	User                     string            `json:"user"`
	Password                 string            `json:"password"`
	Agent                    string            `json:"agent"`
	ProtocolVersion          string            `json:"protocol_version"`
	ChainID                  uos.Checksum256   `json:"chain_id"`
	RequestTransactions      uos.Bool          `json:"request_transactions"`
	LastIrreversibleBlockNum uint32            `json:"last_irr_block_num"`
	PendingBlockIDs          []uos.Checksum256 `json:"pending_block_ids"`
}

type Ping

type Ping struct {
	Sent                  uos.Tstamp      `json:"sent"`
	Code                  uos.Checksum256 `json:"code"`
	LastIrreversibleBlock uint32          `json:"lib"` /// last irreversible block
}

type Pong

type Pong struct {
	Sent uos.Tstamp      `json:"sent"`
	Code uos.Checksum256 `json:"code"`
}

type TransactionNotice

type TransactionNotice struct {
	SignedTransactionIDs []uos.Checksum256 ///< hash of trx + sigs
}

*

  • From bnet_plugin.cpp's `trx_notice`: *
  • This message is sent upon successful speculative application of a transaction
  • and informs a peer not to send this message.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL