Skip to content

Commit d8ff53d

Browse files
authored
Merge pull request #22666 from karalabe/remove-stale-datatype
core/types: drop some relice data types
2 parents 7088f1e + d5e5794 commit d8ff53d

File tree

1 file changed

+0
-32
lines changed

1 file changed

+0
-32
lines changed

core/types/block.go

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -166,35 +166,13 @@ type Block struct {
166166
ReceivedFrom interface{}
167167
}
168168

169-
// DeprecatedTd is an old relic for extracting the TD of a block. It is in the
170-
// code solely to facilitate upgrading the database from the old format to the
171-
// new, after which it should be deleted. Do not use!
172-
func (b *Block) DeprecatedTd() *big.Int {
173-
return b.td
174-
}
175-
176-
// [deprecated by eth/63]
177-
// StorageBlock defines the RLP encoding of a Block stored in the
178-
// state database. The StorageBlock encoding contains fields that
179-
// would otherwise need to be recomputed.
180-
type StorageBlock Block
181-
182169
// "external" block encoding. used for eth protocol, etc.
183170
type extblock struct {
184171
Header *Header
185172
Txs []*Transaction
186173
Uncles []*Header
187174
}
188175

189-
// [deprecated by eth/63]
190-
// "storage" block encoding. used for database.
191-
type storageblock struct {
192-
Header *Header
193-
Txs []*Transaction
194-
Uncles []*Header
195-
TD *big.Int
196-
}
197-
198176
// NewBlock creates a new block. The input data is copied,
199177
// changes to header and to the field values will not affect the
200178
// block.
@@ -279,16 +257,6 @@ func (b *Block) EncodeRLP(w io.Writer) error {
279257
})
280258
}
281259

282-
// [deprecated by eth/63]
283-
func (b *StorageBlock) DecodeRLP(s *rlp.Stream) error {
284-
var sb storageblock
285-
if err := s.Decode(&sb); err != nil {
286-
return err
287-
}
288-
b.header, b.uncles, b.transactions, b.td = sb.Header, sb.Uncles, sb.Txs, sb.TD
289-
return nil
290-
}
291-
292260
// TODO: copies
293261

294262
func (b *Block) Uncles() []*Header { return b.uncles }

0 commit comments

Comments
 (0)