From 9ad0e05b15f8b36f38f19cc1b24dc8b93e845844 Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Thu, 21 Mar 2019 08:37:33 +0800 Subject: core/vm: remove round from addDKG functions (#279) * vendor: sync to latest core * core/vm: remove addDKG functions * core: fix conflict --- dex/db/db.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'dex/db') diff --git a/dex/db/db.go b/dex/db/db.go index b172f924b..2930400b2 100644 --- a/dex/db/db.go +++ b/dex/db/db.go @@ -104,18 +104,18 @@ func (d *DB) GetCompactionChainTipInfo() (hash coreCommon.Hash, height uint64) { return rawdb.ReadCoreCompactionChainTip(d.db) } -func (d *DB) PutOrUpdateDKGMasterPrivateShares( - round uint64, shares coreDKG.PrivateKeyShares) error { - return rawdb.WriteCoreDKGMasterPrivateShares(d.db, round, &shares) +func (d *DB) PutOrUpdateDKGProtocol( + protocol coreDb.DKGProtocolInfo) error { + return rawdb.WriteCoreDKGProtocol(d.db, &protocol) } -func (d *DB) GetDKGMasterPrivateShares(round uint64) ( - shares coreDKG.PrivateKeyShares, err error) { - mpk := rawdb.ReadCoreDKGMasterPrivateShares(d.db, round) - if mpk == nil { - return coreDKG.PrivateKeyShares{}, coreDb.ErrDKGMasterPrivateSharesDoesNotExist +func (d *DB) GetDKGProtocol() ( + protocol coreDb.DKGProtocolInfo, err error) { + dkgProtocol := rawdb.ReadCoreDKGProtocol(d.db) + if dkgProtocol == nil { + return coreDb.DKGProtocolInfo{}, coreDb.ErrDKGProtocolDoesNotExist } - return *mpk, nil + return *dkgProtocol, nil } func (d *DB) Close() error { return nil } -- cgit v1.2.3