mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
Update evm.go
This commit is contained in:
parent
6e97961a69
commit
2c22686452
1 changed files with 16 additions and 1 deletions
17
core/evm.go
17
core/evm.go
|
|
@ -132,7 +132,22 @@ func GetHashFn(ref *types.Header, chain ChainContext) func(n uint64) common.Hash
|
||||||
return common.Hash{}
|
return common.Hash{}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// SYSCOIN returns if there is an NEVM mapping from this blockhash for canonical SYS chain detection
|
||||||
|
func ReadSYSHashFn(chain ChainContext) func(n uint64) []byte {
|
||||||
|
return func(n uint64) []byte {
|
||||||
|
return chain.ReadSYSHash(n)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func ReadDataHashFn(chain ChainContext) func(hash common.Hash) []byte {
|
||||||
|
return func(hash common.Hash) []byte {
|
||||||
|
return chain.ReadDataHash(hash)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
func GetNEVMAddressFn(chain ChainContext) func(address common.Address) []byte {
|
||||||
|
return func(address common.Address) []byte {
|
||||||
|
return chain.GetNEVMAddress(address)
|
||||||
|
}
|
||||||
|
}
|
||||||
// CanTransfer checks whether there are enough funds in the address' account to make a transfer.
|
// CanTransfer checks whether there are enough funds in the address' account to make a transfer.
|
||||||
// This does not take the necessary gas in to account to make the transfer valid.
|
// This does not take the necessary gas in to account to make the transfer valid.
|
||||||
func CanTransfer(db vm.StateDB, addr common.Address, amount *uint256.Int) bool {
|
func CanTransfer(db vm.StateDB, addr common.Address, amount *uint256.Int) bool {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue