mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-29 13:41:47 +00:00
66c8fc8012
merged with the original repo.
26 lines
517 B
Go
26 lines
517 B
Go
package core
|
|
|
|
// tuning parameters
|
|
const (
|
|
secondsPerBlock = 15
|
|
)
|
|
|
|
var (
|
|
genAmount = []int{8, 7, 6, 5, 4, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}
|
|
)
|
|
|
|
// Blockchain holds the chain.
|
|
type Blockchain struct {
|
|
// Any object that satisfies the BlockchainStorer interface.
|
|
BlockchainStorer
|
|
|
|
// index of the latest block.
|
|
currentHeight uint32
|
|
}
|
|
|
|
// NewBlockchain returns a pointer to a Blockchain.
|
|
func NewBlockchain(store BlockchainStorer) *Blockchain {
|
|
return &Blockchain{
|
|
BlockchainStorer: store,
|
|
}
|
|
}
|