From dbd7026125c7db0b76209a412d65a06784e4f7e7 Mon Sep 17 00:00:00 2001 From: syuan100 Date: Mon, 23 Aug 2021 22:35:13 -0700 Subject: [PATCH] Bug fix for middleware processor --- helium/middleware.go | 2 +- helium/types.go | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/helium/middleware.go b/helium/middleware.go index 037b706..e18adcb 100644 --- a/helium/middleware.go +++ b/helium/middleware.go @@ -78,7 +78,7 @@ func GetBlock(blockIdentifier *types.PartialBlockIdentifier) (*types.Block, *typ var processedTxs []*types.Transaction for _, tx := range result.Transactions { - ptx, txErr := GetTransaction(tx) + ptx, txErr := GetTransaction(fmt.Sprint(tx["hash"])) if txErr != nil { return nil, txErr } diff --git a/helium/types.go b/helium/types.go index ff822b5..1cdad10 100644 --- a/helium/types.go +++ b/helium/types.go @@ -423,11 +423,11 @@ var ( ) type Block struct { - Hash string `json:"hash"` - Height int64 `json:"height"` - PrevHash string `json:"prev_hash"` - Time int64 `json:"time"` - Transactions []string `json:"transactions"` + Hash string `json:"hash"` + Height int64 `json:"height"` + PrevHash string `json:"prev_hash"` + Time int64 `json:"time"` + Transactions []map[string]interface{} `json:"transactions"` } type Peer struct {