diff --git a/cmd/burrow/commands/dump.go b/cmd/burrow/commands/dump.go index 46a4aaf83c5d4aabe5c033bf631b3e8a980c24f6..0e53bd3995e5872f13794c33e7bb4121b07b7571 100644 --- a/cmd/burrow/commands/dump.go +++ b/cmd/burrow/commands/dump.go @@ -61,7 +61,14 @@ func Dump(output Output) func(cmd *cli.Cmd) { _, err = explorer.Blocks(start, end, func(block *forensics.Block) (stop bool) { stopped, err := block.Transactions(func(txEnv *txs.Envelope) (stop bool) { - bs, err := json.Marshal(txEnv) + wrapper := struct{ + Height int64 + Tx *txs.Envelope + }{ + Height: block.Height, + Tx: txEnv, + } + bs, err := json.Marshal(wrapper) if err != nil { output.Fatalf("Could not deserialise transaction: %v", err) } diff --git a/forensics/block_explorer.go b/forensics/block_explorer.go index ce2f492e2a01ee1b7af304b5e34f196575ed9991..fdec4bf88031e140c35dd9f664ed5f710da771d9 100644 --- a/forensics/block_explorer.go +++ b/forensics/block_explorer.go @@ -16,7 +16,7 @@ type BlockExplorer struct { func NewBlockExplorer(dbBackendType db.DBBackendType, dbDir string) *BlockExplorer { return &BlockExplorer{ - txDecoder: txs.NewJSONCodec(), + txDecoder: txs.NewAminoCodec(), BlockStore: blockchain.NewBlockStore(tendermint.DBProvider("blockstore", dbBackendType, dbDir)), } }