Skip to content

Commit

Permalink
Fix: return the block from storage, not the latest block
Browse files Browse the repository at this point in the history
  • Loading branch information
p-offtermatt committed Oct 10, 2023
1 parent 0346040 commit eaa9ce3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cometmock/rpc_server/routes.go
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ func Block(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultBlock, error)
return nil, err
}

return &ctypes.ResultBlock{BlockID: *blockID, Block: abci_client.GlobalClient.LastBlock}, nil
return &ctypes.ResultBlock{BlockID: *blockID, Block: block}, nil
}

// BlockResults gets ABCIResults at a given height.
Expand Down

0 comments on commit eaa9ce3

Please sign in to comment.