aboutsummaryrefslogtreecommitdiffstats
path: root/core/types/block.go
diff options
context:
space:
mode:
authorSteven Roose <stevenroose@gmail.com>2018-04-05 20:13:02 +0800
committerFelix Lange <fjl@users.noreply.github.com>2018-04-05 20:13:02 +0800
commitec8ee611caefb5c5ad5d796178e94c1919260df4 (patch)
tree275a9f91e33abfdafa0a6fdf113e4601616545cd /core/types/block.go
parent1e248f3a6e14f3bfc9ebe1b315c4194300220f68 (diff)
downloadgo-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 'core/types/block.go')
-rw-r--r--core/types/block.go35
1 files changed, 0 insertions, 35 deletions
diff --git a/core/types/block.go b/core/types/block.go
index 92b868d9d..ae1b4299d 100644
--- a/core/types/block.go
+++ b/core/types/block.go
@@ -19,7 +19,6 @@ package types
import (
"encoding/binary"
- "fmt"
"io"
"math/big"
"sort"
@@ -389,40 +388,6 @@ func (b *Block) Hash() common.Hash {
return v
}
-func (b *Block) String() string {
- str := fmt.Sprintf(`Block(#%v): Size: %v {
-MinerHash: %x
-%v
-Transactions:
-%v
-Uncles:
-%v
-}
-`, b.Number(), b.Size(), b.header.HashNoNonce(), b.header, b.transactions, b.uncles)
- return str
-}
-
-func (h *Header) String() string {
- return fmt.Sprintf(`Header(%x):
-[
- ParentHash: %x
- UncleHash: %x
- Coinbase: %x
- Root: %x
- TxSha %x
- ReceiptSha: %x
- Bloom: %x
- Difficulty: %v
- Number: %v
- GasLimit: %v
- GasUsed: %v
- Time: %v
- Extra: %s
- MixDigest: %x
- Nonce: %x
-]`, h.Hash(), h.ParentHash, h.UncleHash, h.Coinbase, h.Root, h.TxHash, h.ReceiptHash, h.Bloom, h.Difficulty, h.Number, h.GasLimit, h.GasUsed, h.Time, h.Extra, h.MixDigest, h.Nonce)
-}
-
type Blocks []*Block
type BlockBy func(b1, b2 *Block) bool