From bbd2910687e9e5cd5c52e887f837f5c992ba2261 Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Wed, 20 Mar 2019 11:55:01 +0800 Subject: consensus: dexcon: disqualify dead node (#280) Since a qualified node might fail stopped, we need to remove them from qualified nodes to maintain network integrity. We do this by inspect the previous round to see if there are dead nodes. A dead node is a notary set node that does not propose any block in the previous round. We disqualify them by fining them so their staked value is 1 wei below minStake. This make them unqualified for being notary set in the follow on rounds. --- dex/downloader/testchain_test.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dex/downloader') diff --git a/dex/downloader/testchain_test.go b/dex/downloader/testchain_test.go index 722159bc0..15528c509 100644 --- a/dex/downloader/testchain_test.go +++ b/dex/downloader/testchain_test.go @@ -342,3 +342,7 @@ func (g *govStateFetcher) GetStateForConfigAtRound(round uint64) *vm.GovernanceS } return nil } + +func (g *govStateFetcher) NotarySetNodeKeyAddresses(round uint64) (map[common.Address]struct{}, error) { + return make(map[common.Address]struct{}), nil +} -- cgit v1.2.3