mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
miner: don't update the pending block, fix tests
This commit is contained in:
parent
ab0d224c73
commit
72f4467c0d
2 changed files with 6 additions and 4 deletions
|
|
@ -598,8 +598,9 @@ func testAtFunctions(t *testing.T, client *rpc.Client) {
|
|||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
if pending != 1 {
|
||||
t.Fatalf("unexpected pending, wanted 1 got: %v", pending)
|
||||
// After nerfing the pending block, pending transaction count will be 0
|
||||
if pending != 0 {
|
||||
t.Fatalf("unexpected pending, wanted 0 got: %v", pending)
|
||||
}
|
||||
// Query balance
|
||||
balance, err := ec.BalanceAt(context.Background(), testAddr, nil)
|
||||
|
|
@ -617,7 +618,8 @@ func testAtFunctions(t *testing.T, client *rpc.Client) {
|
|||
if err != nil {
|
||||
t.Fatalf("unexpected error: %v", err)
|
||||
}
|
||||
if balance.Cmp(penBalance) == 0 {
|
||||
// After nerfing the pending block, pending balance will be equal to balance
|
||||
if balance.Cmp(penBalance) != 0 {
|
||||
t.Fatalf("unexpected balance: %v %v", balance, penBalance)
|
||||
}
|
||||
// NonceAt
|
||||
|
|
|
|||
|
|
@ -533,7 +533,7 @@ func (w *worker) mainLoop() {
|
|||
// Note all transactions received may not be continuous with transactions
|
||||
// already included in the current sealing block. These transactions will
|
||||
// be automatically eliminated.
|
||||
if !w.isRunning() && w.current != nil {
|
||||
if !w.chainConfig.TerminalTotalDifficultyPassed && !w.isRunning() && w.current != nil {
|
||||
// If block is already full, abort
|
||||
if gp := w.current.gasPool; gp != nil && gp.Gas() < params.TxGas {
|
||||
continue
|
||||
|
|
|
|||
Loading…
Reference in a new issue