merge undefined instead of panicking (#30)

verkle/onleaf
Guillaume Ballet 3 years ago
parent e1144745a7
commit ef08e51e40
  1. 7
      core/types/access_witness.go

@ -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 {

Loading…
Cancel
Save