evidence: improve amnesia evidence handling (#5003)

fix bug so that PotentialAmnesiaEvidence is being gossiped

handle inbound amnesia evidence correctly

add method to check if potential amnesia evidence is on trial

fix a bug with the height when we upgrade to amnesia evidence

change evidence to using just pointers.

More logging in the evidence module

Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
Callum Waters
2020-06-23 17:09:14 +02:00
committed by GitHub
parent 44b306b38e
commit 65d7ce9c9c
15 changed files with 833 additions and 544 deletions

View File

@@ -1083,7 +1083,7 @@ func TestClientReportsConflictingHeadersEvidence(t *testing.T) {
}
// Check evidence was sent to both full nodes.
ev := types.ConflictingHeadersEvidence{H1: h2, H2: altH2}
ev := &types.ConflictingHeadersEvidence{H1: h2, H2: altH2}
assert.True(t, fullNode2.HasEvidence(ev))
assert.True(t, fullNode.HasEvidence(ev))
}