Write state diffs directly to Postgres #30

Merged
telackey merged 19 commits from statediff-into-postgres into statediff_at_anyblock-1.9.11 2020-11-11 16:26:25 +00:00
Showing only changes of commit ddc84744ce - Show all commits
+3
View File
@@ -529,6 +529,9 @@ func (sds *Service) writeStateDiff(block *types.Block, parentRoot common.Hash, p
receipts = sds.BlockChain.GetReceiptsByHash(block.Hash())
}
tx, err := sds.indexer.PushBlock(block, receipts, totalDifficulty)
if err != nil {
return err
}
// defer handling of commit/rollback for any return case
defer tx.Close()
output := func(node StateNode) error {