diff options
author | Steven Roose <stevenroose@gmail.com> | 2018-04-05 20:13:02 +0800 |
---|---|---|
committer | Felix Lange <fjl@users.noreply.github.com> | 2018-04-05 20:13:02 +0800 |
commit | ec8ee611caefb5c5ad5d796178e94c1919260df4 (patch) | |
tree | 275a9f91e33abfdafa0a6fdf113e4601616545cd /internal/ethapi/api.go | |
parent | 1e248f3a6e14f3bfc9ebe1b315c4194300220f68 (diff) | |
download | go-tangerine-ec8ee611caefb5c5ad5d796178e94c1919260df4.tar go-tangerine-ec8ee611caefb5c5ad5d796178e94c1919260df4.tar.gz go-tangerine-ec8ee611caefb5c5ad5d796178e94c1919260df4.tar.bz2 go-tangerine-ec8ee611caefb5c5ad5d796178e94c1919260df4.tar.lz go-tangerine-ec8ee611caefb5c5ad5d796178e94c1919260df4.tar.xz go-tangerine-ec8ee611caefb5c5ad5d796178e94c1919260df4.tar.zst go-tangerine-ec8ee611caefb5c5ad5d796178e94c1919260df4.zip |
core/types: remove String methods from struct types (#16205)
Most of these methods did not contain all the relevant information
inside the object and were not using a similar formatting type.
Moreover, the existence of a suboptimal String method breaks usage
with more advanced data dumping tools like go-spew.
Diffstat (limited to 'internal/ethapi/api.go')
-rw-r--r-- | internal/ethapi/api.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/ethapi/api.go b/internal/ethapi/api.go index 6525aa212..e2bfbaf30 100644 --- a/internal/ethapi/api.go +++ b/internal/ethapi/api.go @@ -25,6 +25,7 @@ import ( "strings" "time" + "github.com/davecgh/go-spew/spew" "github.com/ethereum/go-ethereum/accounts" "github.com/ethereum/go-ethereum/accounts/keystore" "github.com/ethereum/go-ethereum/common" @@ -1388,7 +1389,7 @@ func (api *PublicDebugAPI) PrintBlock(ctx context.Context, number uint64) (strin if block == nil { return "", fmt.Errorf("block #%d not found", number) } - return block.String(), nil + return spew.Sdump(block), nil } // SeedHash retrieves the seed hash of a block. |