iotaledger / iri

IOTA Reference Implementation
Other
1.15k stars 370 forks source link

Fix visibility problem on shouldPersist and refactor tvm update methods #1832

Closed acha-bill closed 4 years ago

acha-bill commented 4 years ago

Description

Txs that were being quick set solid were not being persisted upon release from cache. This change ensures that updates are always persisted by assuming responsibility to always call tvm.update Also, fixes is a possible race condition with tvm.shouldPersist and cache metric fields.

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

Checklist:

Please delete items that are not relevant.

DyrellC commented 4 years ago

I agree with you @galrogo :+1: