aboutsummaryrefslogtreecommitdiffstats
path: root/mobile/types.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 /mobile/types.go
parent1e248f3a6e14f3bfc9ebe1b315c4194300220f68 (diff)
downloaddexon-ec8ee611caefb5c5ad5d796178e94c1919260df4.tar.gz
dexon-ec8ee611caefb5c5ad5d796178e94c1919260df4.tar.zst
dexon-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 'mobile/types.go')
-rw-r--r--mobile/types.go24
1 files changed, 0 insertions, 24 deletions
diff --git a/mobile/types.go b/mobile/types.go
index 4790afcef..24cd7ebf1 100644
--- a/mobile/types.go
+++ b/mobile/types.go
@@ -97,12 +97,6 @@ func (h *Header) EncodeJSON() (string, error) {
return string(data), err
}
-// String implements the fmt.Stringer interface to print some semi-meaningful
-// data dump of the header for debugging purposes.
-func (h *Header) String() string {
- return h.header.String()
-}
-
func (h *Header) GetParentHash() *Hash { return &Hash{h.header.ParentHash} }
func (h *Header) GetUncleHash() *Hash { return &Hash{h.header.UncleHash} }
func (h *Header) GetCoinbase() *Address { return &Address{h.header.Coinbase} }
@@ -174,12 +168,6 @@ func (b *Block) EncodeJSON() (string, error) {
return string(data), err
}
-// String implements the fmt.Stringer interface to print some semi-meaningful
-// data dump of the block for debugging purposes.
-func (b *Block) String() string {
- return b.block.String()
-}
-
func (b *Block) GetParentHash() *Hash { return &Hash{b.block.ParentHash()} }
func (b *Block) GetUncleHash() *Hash { return &Hash{b.block.UncleHash()} }
func (b *Block) GetCoinbase() *Address { return &Address{b.block.Coinbase()} }
@@ -249,12 +237,6 @@ func (tx *Transaction) EncodeJSON() (string, error) {
return string(data), err
}
-// String implements the fmt.Stringer interface to print some semi-meaningful
-// data dump of the transaction for debugging purposes.
-func (tx *Transaction) String() string {
- return tx.tx.String()
-}
-
func (tx *Transaction) GetData() []byte { return tx.tx.Data() }
func (tx *Transaction) GetGas() int64 { return int64(tx.tx.Gas()) }
func (tx *Transaction) GetGasPrice() *BigInt { return &BigInt{tx.tx.GasPrice()} }
@@ -347,12 +329,6 @@ func (r *Receipt) EncodeJSON() (string, error) {
return string(data), err
}
-// String implements the fmt.Stringer interface to print some semi-meaningful
-// data dump of the transaction receipt for debugging purposes.
-func (r *Receipt) String() string {
- return r.receipt.String()
-}
-
func (r *Receipt) GetPostState() []byte { return r.receipt.PostState }
func (r *Receipt) GetCumulativeGasUsed() int64 { return int64(r.receipt.CumulativeGasUsed) }
func (r *Receipt) GetBloom() *Bloom { return &Bloom{r.receipt.Bloom} }