abieos
abieos copied to clipboard
erase old version abi before insert new version abi when set abi
Because element keys in a map are unique, the insertion operation checks whether each inserted element has a key equivalent to the one of an element already in the container, and if so, the element is not inserted. So when we set a contract of new version, we must erase old version first. Otherwise the new contract is not inserted, and the old contract is still in context.