mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-23 23:30:36 +00:00
0232bbcb0c
We should store each GAS record as { Key: ContractID + RecordsPrefix + RecordID, Value: RecordValue, } So don't use state.GASRecord for storing anymore. However, it's still useful to cache GasRecord values by using state.GASRecords, because we have to keep GASIndexPairs sorted by indexes.
13 lines
337 B
Go
13 lines
337 B
Go
package native
|
|
|
|
import "math/big"
|
|
|
|
// gasIndexPair contains block index together with generated gas per block.
|
|
// It is used to cache NEO GASRecords.
|
|
type gasIndexPair struct {
|
|
Index uint32
|
|
GASPerBlock big.Int
|
|
}
|
|
|
|
// gasRecord contains history of gas per block changes. It is used only by NEO cache.
|
|
type gasRecord []gasIndexPair
|