consensus/clique: Proof of Authority (#3753)

This PR is a prototype implementation of plugable consensus engines and the
Clique PoA protocol ethereum/EIPs#225
This commit is contained in:
Péter Szilágyi
2017-04-10 13:24:12 +03:00
committed by Felix Lange
parent bfe5eb7f8c
commit feeccdf4ec
12 changed files with 1576 additions and 124 deletions

View File

@@ -532,13 +532,10 @@ func testInsertNonceError(t *testing.T, full bool) {
blockchain.hc.engine = blockchain.engine
failRes, err = blockchain.InsertHeaderChain(headers, 1)
}
// Check that the returned error indicates the nonce failure.
// Check that the returned error indicates the failure.
if failRes != failAt {
t.Errorf("test %d: failure index mismatch: have %d, want %d", i, failRes, failAt)
}
if err != ethash.ErrInvalidPoW {
t.Fatalf("test %d: error mismatch: have %v, want %v", i, err, ethash.ErrInvalidPoW)
}
// Check that all no blocks after the failing block have been inserted.
for j := 0; j < i-failAt; j++ {
if full {