mirror of
https://github.com/tendermint/tendermint.git
synced 2026-02-05 03:20:44 +00:00
block/state: gas price for block and tx
This commit is contained in:
@@ -107,12 +107,16 @@ type Header struct {
|
||||
Height uint
|
||||
Time time.Time
|
||||
Fees uint64
|
||||
GasPrice uint64
|
||||
NumTxs uint
|
||||
LastBlockHash []byte
|
||||
LastBlockParts PartSetHeader
|
||||
StateHash []byte
|
||||
}
|
||||
|
||||
// possible for actual gas price to be less than 1
|
||||
var GasPriceDivisor = 1000000
|
||||
|
||||
func (h *Header) Hash() []byte {
|
||||
buf := new(bytes.Buffer)
|
||||
hasher, n, err := sha256.New(), new(int64), new(error)
|
||||
|
||||
17
block/tx.go
17
block/tx.go
@@ -10,14 +10,15 @@ import (
|
||||
)
|
||||
|
||||
var (
|
||||
ErrTxInvalidAddress = errors.New("Error invalid address")
|
||||
ErrTxDuplicateAddress = errors.New("Error duplicate address")
|
||||
ErrTxInvalidAmount = errors.New("Error invalid amount")
|
||||
ErrTxInsufficientFunds = errors.New("Error insufficient funds")
|
||||
ErrTxUnknownPubKey = errors.New("Error unknown pubkey")
|
||||
ErrTxInvalidPubKey = errors.New("Error invalid pubkey")
|
||||
ErrTxInvalidSignature = errors.New("Error invalid signature")
|
||||
ErrTxInvalidSequence = errors.New("Error invalid sequence")
|
||||
ErrTxInvalidAddress = errors.New("Error invalid address")
|
||||
ErrTxDuplicateAddress = errors.New("Error duplicate address")
|
||||
ErrTxInvalidAmount = errors.New("Error invalid amount")
|
||||
ErrTxInsufficientFunds = errors.New("Error insufficient funds")
|
||||
ErrTxInsufficientGasPrice = errors.New("Error insufficient gas price")
|
||||
ErrTxUnknownPubKey = errors.New("Error unknown pubkey")
|
||||
ErrTxInvalidPubKey = errors.New("Error invalid pubkey")
|
||||
ErrTxInvalidSignature = errors.New("Error invalid signature")
|
||||
ErrTxInvalidSequence = errors.New("Error invalid sequence")
|
||||
)
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user