-
Notifications
You must be signed in to change notification settings - Fork 207
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor the miner #1545
Refactor the miner #1545
Changes from all commits
e1e51cd
0f8e175
d0c6de0
4f0c951
6d09400
ab86aab
6a93759
fe4c813
5107233
8e38a1b
a852cb0
7172c42
498fda5
8623e59
8a0ac2f
98da0c6
965c634
fbf9dc0
0d4694c
152e24c
55e5304
e029737
ec3ea4a
c29c60b
06d9136
00aebc6
694c922
271a39c
1a153bb
0e42c75
0f1f0ad
7c3ae70
29f94a4
2f82cad
3ae13df
b722863
5a5fe3e
1fbbaa6
731fe33
ff7e02b
c1d65cd
9202dfc
8c436c6
fcb9b66
f400ee5
a8cd3f7
bdfab30
94f8f15
8c70080
277ebec
70c67bf
1fe552d
7ee8200
5d695c6
4935874
bd63e26
77eada2
27c46e0
bee98a8
3dd4973
3fd457a
1ce06f4
aec7759
19b625f
95cda4d
0b84d18
a466ab4
6054b2a
b591def
8e9c2ac
858ebd1
c3c83f7
ed78fdc
22bd0e2
72588fc
8aceb44
1eb63ae
cbe352d
82de5d4
0aea1b4
33e7ff4
c4046e5
d5ec1e6
a351398
83affa3
ed47233
7567d7f
2466105
96fb0dc
9a2bc6b
0c89ebe
bfa3dd9
1b44835
345f10c
26560bc
91d5178
57ceb42
90c2e5a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -223,6 +223,7 @@ func makeBlockWithoutSeal(chain *core.BlockChain, engine *Backend, parent *types | |
// The worker that calls Prepare is the one filling the Coinbase | ||
header.Coinbase = engine.address | ||
engine.Prepare(chain, header) | ||
time.Sleep(time.Until(time.Unix(int64(header.Time), 0))) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we need to sleep? would be ncie if we didn't as i've seen we are not really testing this behaviuor, but just need to create blocks on the test There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The tests have issues if we don't sleep at all, but it's definitely possible to sleep for less time. |
||
|
||
state, err := chain.StateAt(parent.Root()) | ||
if err != nil { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is awckward...
we have a method call
addParentSeal()
that does asleep
. As a reader, why would adding a seal implies sleeping?And then i have a Prepare() than ask if we are validating...
I know this is not from this PR, and the ware only bringing up the awckarness to the surface. But i wonder if there's a clearer way to express this.