Documentation
¶
Index ¶
- Constants
- func CopyEnvelopesToIfaces(in []*Envelope) []interface{}
- func CreateGenesis()
- func Ctxts(n int) []context.Context
- func Discover(ctx context.Context, h host.Host, dht *dht.IpfsDHT, rendezvous string)
- func NewBlockchain()
- func NewKDHT(ctx context.Context, host host.Host, bootstrapPeers []multiaddr.Multiaddr) (*disc.RoutingDiscovery, error)
- type EchoRPCAPI
- type Envelope
- type Genesis
- type LamaBlockchain
- type NewTx
- type Node
- type Processor
- type Service
- type TipChange
Constants ¶
View Source
const ( EchoService = "EchoRPCAPI" EchoServiceFuncEcho = "Echo" )
Variables ¶
This section is empty.
Functions ¶
func CopyEnvelopesToIfaces ¶
func CopyEnvelopesToIfaces(in []*Envelope) []interface{}
func CreateGenesis ¶
func CreateGenesis()
func NewBlockchain ¶
func NewBlockchain()
Types ¶
type EchoRPCAPI ¶
type EchoRPCAPI struct {
// contains filtered or unexported fields
}
type Genesis ¶
type Genesis struct {
ChainID *big.Int
VersionID *big.Int
OriginatingHost string
OriginalValidators map[string]common.Address
CoinbaseAddress string
Coin string
StakingCoin string
GenesisValidators map[string]string
BlockRoot string
GenesisTime int64
NextBlockHash string
Signature string
Proof string
// contains filtered or unexported fields
}
type LamaBlockchain ¶
type LamaBlockchain struct {
Genesis *Genesis
Blocks []*primitives.Block
// contains filtered or unexported fields
}
func (*LamaBlockchain) GetChainID ¶
func (L *LamaBlockchain) GetChainID() *big.Int
func (*LamaBlockchain) LoadGenesis ¶
func (L *LamaBlockchain) LoadGenesis()
type NewTx ¶
type NewTx struct {
TransactionID *big.Int // transaction ID
Transaction *tx.Transaction // new transaction
Source string // who sent it
}
type Node ¶
type Processor ¶
type Processor struct {
GenesisID *big.Int
BlockRouterID *big.Int
OracleID *big.Int
BlockStorage storage.LocalStorage
LamaChain LamaBlockchain
// contains filtered or unexported fields
}
func NewProcessor ¶
func NewProcessor(genesisID *big.Int, blockStore storage.LocalStorage, txQueue []tx.Transaction, chain LamaBlockchain) *Processor
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) ReceiveEcho ¶
func (*Service) StartMessaging ¶
type TipChange ¶
type TipChange struct {
BlockID *big.Int // block ID of the main chain tip block
Block *primitives.Block // full block
Source string // who sent the block that caused this change
Connect bool // true if the tip has been connected. false for disconnected
More bool // true if the tip has been connected and more connections are expected
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.