forked from cerc-io/laconicd-deprecated
evm: code comments and cleanup (#404)
* evm: code comments and cleanup * context comment * abci, tx type event and metrics * statedb comments
This commit is contained in:
@@ -8,6 +8,7 @@ const (
|
||||
AttributeKeyRecipient = "recipient"
|
||||
AttributeKeyTxHash = "txHash"
|
||||
AttributeKeyEthereumTxHash = "ethereumTxHash"
|
||||
AttributeKeyTxType = "txType"
|
||||
// tx failed in eth vm execution
|
||||
AttributeKeyEthereumTxFailed = "ethereumTxFailed"
|
||||
AttributeValueCategory = ModuleName
|
||||
|
||||
@@ -30,9 +30,6 @@ const (
|
||||
prefixLogs
|
||||
prefixCode
|
||||
prefixStorage
|
||||
prefixChainConfig
|
||||
prefixHashTxReceipt
|
||||
prefixBlockHeightTxs
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -53,9 +50,6 @@ var (
|
||||
KeyPrefixLogs = []byte{prefixLogs}
|
||||
KeyPrefixCode = []byte{prefixCode}
|
||||
KeyPrefixStorage = []byte{prefixStorage}
|
||||
KeyPrefixChainConfig = []byte{prefixChainConfig}
|
||||
KeyPrefixHashTxReceipt = []byte{prefixHashTxReceipt}
|
||||
KeyPrefixBlockHeightTxs = []byte{prefixBlockHeightTxs}
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -85,17 +79,6 @@ func StateKey(address ethcmn.Address, key []byte) []byte {
|
||||
return append(AddressStoragePrefix(address), key...)
|
||||
}
|
||||
|
||||
// KeyHashTxReceipt returns a key for accessing tx receipt data by hash.
|
||||
func KeyHashTxReceipt(hash ethcmn.Hash) []byte {
|
||||
return append(KeyPrefixHashTxReceipt, hash.Bytes()...)
|
||||
}
|
||||
|
||||
// KeyBlockHeightTxs returns a key for accessing tx hash list by block height.
|
||||
func KeyBlockHeightTxs(height uint64) []byte {
|
||||
heightBytes := sdk.Uint64ToBigEndian(height)
|
||||
return append(KeyPrefixBlockHeightTxs, heightBytes...)
|
||||
}
|
||||
|
||||
// KeyAddressStorage returns the key hash to access a given account state. The composite key
|
||||
// (address + hash) is hashed using Keccak256.
|
||||
func KeyAddressStorage(address ethcmn.Address, hash ethcmn.Hash) ethcmn.Hash {
|
||||
|
||||
Reference in New Issue
Block a user