Verkle EXTCODECOPY implementation (#55)

* core/vm: verkle extcodecopy naive way (do jumpdest analysis on target contract every EXTCODECOPY)

* no double-charge

* address edge-case in touchEachChunksAndChargeGas

* simplify line

Co-authored-by: Guillaume Ballet <3272758+gballet@users.noreply.github.com>
This commit is contained in:
jwasinger
2022-01-13 02:06:21 -10:00
committed by GitHub
parent d761880fd2
commit 952be80177
5 changed files with 29 additions and 22 deletions

View File

@ -61,8 +61,8 @@ func (bits bitvec) set16(pos uint64) {
bits[pos/8+2] = ^a
}
// codeSegment checks if the position is in a code segment.
func (bits *bitvec) codeSegment(pos uint64) bool {
// IsCode checks if the position is in a code segment.
func (bits *bitvec) IsCode(pos uint64) bool {
return ((*bits)[pos/8] & (0x80 >> (pos % 8))) == 0
}