Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
d5e57948
Unverified
Commit
d5e57948
authored
Apr 14, 2021
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core/types: drop some relice data types
parent
7088f1e8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
32 deletions
+0
-32
block.go
core/types/block.go
+0
-32
No files found.
core/types/block.go
View file @
d5e57948
...
...
@@ -166,19 +166,6 @@ type Block struct {
ReceivedFrom
interface
{}
}
// DeprecatedTd is an old relic for extracting the TD of a block. It is in the
// code solely to facilitate upgrading the database from the old format to the
// new, after which it should be deleted. Do not use!
func
(
b
*
Block
)
DeprecatedTd
()
*
big
.
Int
{
return
b
.
td
}
// [deprecated by eth/63]
// StorageBlock defines the RLP encoding of a Block stored in the
// state database. The StorageBlock encoding contains fields that
// would otherwise need to be recomputed.
type
StorageBlock
Block
// "external" block encoding. used for eth protocol, etc.
type
extblock
struct
{
Header
*
Header
...
...
@@ -186,15 +173,6 @@ type extblock struct {
Uncles
[]
*
Header
}
// [deprecated by eth/63]
// "storage" block encoding. used for database.
type
storageblock
struct
{
Header
*
Header
Txs
[]
*
Transaction
Uncles
[]
*
Header
TD
*
big
.
Int
}
// NewBlock creates a new block. The input data is copied,
// changes to header and to the field values will not affect the
// block.
...
...
@@ -279,16 +257,6 @@ func (b *Block) EncodeRLP(w io.Writer) error {
})
}
// [deprecated by eth/63]
func
(
b
*
StorageBlock
)
DecodeRLP
(
s
*
rlp
.
Stream
)
error
{
var
sb
storageblock
if
err
:=
s
.
Decode
(
&
sb
);
err
!=
nil
{
return
err
}
b
.
header
,
b
.
uncles
,
b
.
transactions
,
b
.
td
=
sb
.
Header
,
sb
.
Uncles
,
sb
.
Txs
,
sb
.
TD
return
nil
}
// TODO: copies
func
(
b
*
Block
)
Uncles
()
[]
*
Header
{
return
b
.
uncles
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment