From 6c3d02b7c43ee470938fb929f60336d151cf25ca Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Thu, 24 Jan 2019 15:05:24 +0800 Subject: consensus: dexcon: snapshot round height when finalizing block (#170) Instead of having BP to send a tx to register the round height, just modify the state when finalizing block. --- dex/governance.go | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'dex/governance.go') diff --git a/dex/governance.go b/dex/governance.go index e9ea1f89c..1b037cf2b 100644 --- a/dex/governance.go +++ b/dex/governance.go @@ -145,20 +145,6 @@ func (d *DexconGovernance) NodeSet(round uint64) []coreCrypto.PublicKey { return pks } -// NotifyRoundHeight register the mapping between round and height. -func (d *DexconGovernance) NotifyRoundHeight(targetRound, consensusHeight uint64) { - data, err := vm.PackNotifyRoundHeight(targetRound, consensusHeight) - if err != nil { - log.Error("failed to pack snapshotRound input", "err", err) - return - } - - err = d.sendGovTx(context.Background(), data) - if err != nil { - log.Error("failed to send snapshotRound tx", "err", err) - } -} - // AddDKGComplaint adds a DKGComplaint. func (d *DexconGovernance) AddDKGComplaint(round uint64, complaint *dkgTypes.Complaint) { data, err := vm.PackAddDKGComplaint(round, complaint) -- cgit v1.2.3