Skip to content

Commit d82cb30

Browse files
committed
add comments for new methods
1 parent a326b1e commit d82cb30

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

core/systemcontracts/contracts.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,14 @@ func init() {
4444
}
4545
}
4646

47+
// GetMinGasPriceStateHash computes and returns the storage key of minGasPrice
48+
// in policy contract, for reading corresponding values from statedb.
4749
func GetMinGasPriceStateHash() common.Hash {
4850
return common.BytesToHash([]byte{minGasPriceSlotIndex})
4951
}
5052

53+
// GetBlackListStateHash computes and returns the storage key of blockList
54+
// in policy contract with an address, for reading corresponding values from statedb.
5155
func GetBlackListStateHash(addr common.Address) common.Hash {
5256
return crypto.Keccak256Hash(common.LeftPadBytes(addr.Bytes(), 32), common.LeftPadBytes([]byte{blackListSlotIndex}, 32))
5357
}

0 commit comments

Comments
 (0)