return full tx

pull/1214/head
Richard Liu 5 years ago
parent 1e13aa884f
commit ffb5263a12
  1. 2
      internal/hmyapi/blockchain.go

@ -24,7 +24,7 @@ func NewPublicBlockChainAPI(b Backend) *PublicBlockChainAPI {
func (s *PublicBlockChainAPI) GetBlockByNumber(ctx context.Context, blockNr rpc.BlockNumber, fullTx bool) (map[string]interface{}, error) {
block, err := s.b.BlockByNumber(ctx, blockNr)
if block != nil {
response, err := RPCMarshalBlock(block, false, false)
response, err := RPCMarshalBlock(block, true, fullTx)
if err == nil && blockNr == rpc.PendingBlockNumber {
// Pending blocks need to nil out a few fields
for _, field := range []string{"hash", "nonce", "miner"} {

Loading…
Cancel
Save