Add state finalizers

This commit is contained in:
lash
2022-03-14 21:17:00 +00:00
parent f8b256b51b
commit 92cb5d1978
7 changed files with 33 additions and 11 deletions

View File

@@ -57,7 +57,7 @@ class TestCache(TestShepBase):
self.assertTrue(isinstance(tx.value, float))
self.assertEqual(tx.sender[:4], 'addr')
self.assertEqual(tx.recipient[:4], 'addr')
self.assertEqual(tx.tx_hash[:11], 'ashbashhash')
self.assertEqual(tx.hash[:11], 'ashbashhash')
def test_cache_putget(self):
@@ -65,7 +65,7 @@ class TestCache(TestShepBase):
tx = MockCacheTokenTx()
tx.deserialize(a)
self.cache.put(self.chain_spec, tx)
tx_retrieved = self.cache.get(self.chain_spec, tx.tx_hash)
tx_retrieved = self.cache.get(self.chain_spec, tx.hash)
self.assertEqual(tx, tx_retrieved)