зеркало из https://github.com/microsoft/eEVM.git
Clarify that get_block_hash takes a <256 offset, not block index (#28)
This commit is contained in:
Родитель
3ca7eedc4d
Коммит
d39457e705
|
@ -1103,7 +1103,7 @@ namespace evm
|
|||
if (i >= 256)
|
||||
ctxt->s.push(0);
|
||||
else
|
||||
ctxt->s.push(gs.get_block_hash(i));
|
||||
ctxt->s.push(gs.get_block_hash(i % 256));
|
||||
}
|
||||
|
||||
void number()
|
||||
|
|
|
@ -44,7 +44,7 @@ namespace evm
|
|||
return currentBlock;
|
||||
}
|
||||
|
||||
uint256_t SimpleGlobalState::get_block_hash(uint64_t idx)
|
||||
uint256_t SimpleGlobalState::get_block_hash(uint8_t offset)
|
||||
{
|
||||
return 0u;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace evm
|
|||
size_t num_accounts() override;
|
||||
|
||||
virtual const Block& get_current_block() override;
|
||||
virtual uint256_t get_block_hash(uint64_t idx) override;
|
||||
virtual uint256_t get_block_hash(uint8_t offset) override;
|
||||
|
||||
/**
|
||||
* For tests which require some initial state, allow manual insertion of
|
||||
|
|
|
@ -46,6 +46,6 @@ namespace evm
|
|||
virtual size_t num_accounts() = 0;
|
||||
|
||||
virtual const Block& get_current_block() = 0;
|
||||
virtual uint256_t get_block_hash(uint64_t idx) = 0;
|
||||
virtual uint256_t get_block_hash(uint8_t offset) = 0;
|
||||
};
|
||||
} // namespace evm
|
||||
|
|
Загрузка…
Ссылка в новой задаче