Skip to content

Commit

Permalink
merge undefined instead of panicking (#30)
Browse files Browse the repository at this point in the history
  • Loading branch information
gballet committed Nov 17, 2021
1 parent d336601 commit 8a3b8e8
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions core/types/access_witness.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,10 @@ func (aw *AccessWitness) TouchAddressAndChargeGas(addr, value []byte) uint64 {
// of a tx, with the accumulation of witnesses that were generated during the
// execution of all the txs preceding this one in a given block.
func (aw *AccessWitness) Merge(other *AccessWitness) {
// catch unresolved touched addresses
if len(other.Undefined) != 0 {
panic("undefined value in witness")
for k := range other.Undefined {
if _, ok := aw.Undefined[k]; !ok {
aw.Undefined[k] = struct{}{}
}
}

for k := range other.Branches {
Expand Down

0 comments on commit 8a3b8e8

Please sign in to comment.