semuxproject / semux-core

Semux Core
https://www.semux.org
MIT License
76 stars 32 forks source link

Why does semuxRepository. rollback() call DelegateState.commit(), which I think should call DelegateState.rollback() #306

Closed VictorECDSA closed 3 years ago

VictorECDSA commented 3 years ago

src/main/java/org/semux/vm/client/SemuxRepository.java

    @Override
    public void rollback() {
        accountState.rollback();
        delegateState.commit();
    }

Why does semuxRepository. rollback() call DelegateState.commit(), which I think should call DelegateState.rollback()

semuxgo commented 3 years ago

Thank you @fenghaoming for spotting this bug.

We've fixed it in https://github.com/semuxproject/semux-core/commit/ec75fc993b62991e76da0ba00b4266da83a7415d.

If you can send us your Semux address via discord, we will send you a bounty for this.