merge undefined instead of panicking (#30)
This commit is contained in:
parent
e1144745a7
commit
ef08e51e40
@ -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
|
// 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.
|
// execution of all the txs preceding this one in a given block.
|
||||||
func (aw *AccessWitness) Merge(other *AccessWitness) {
|
func (aw *AccessWitness) Merge(other *AccessWitness) {
|
||||||
// catch unresolved touched addresses
|
for k := range other.Undefined {
|
||||||
if len(other.Undefined) != 0 {
|
if _, ok := aw.Undefined[k]; !ok {
|
||||||
panic("undefined value in witness")
|
aw.Undefined[k] = struct{}{}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for k := range other.Branches {
|
for k := range other.Branches {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user