diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2019-03-21 08:37:33 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@byzantine-lab.io> | 2019-06-13 18:11:44 +0800 |
commit | d82cacf5ac51ef695b921a9c2683c38c779d1050 (patch) | |
tree | 720005698e986d8eba31b0a98960f3efc1760aa6 /dex/db | |
parent | ba1eb31880ea5fae9a8e99b21ac165360e0ea30e (diff) | |
download | go-tangerine-d82cacf5ac51ef695b921a9c2683c38c779d1050.tar go-tangerine-d82cacf5ac51ef695b921a9c2683c38c779d1050.tar.gz go-tangerine-d82cacf5ac51ef695b921a9c2683c38c779d1050.tar.bz2 go-tangerine-d82cacf5ac51ef695b921a9c2683c38c779d1050.tar.lz go-tangerine-d82cacf5ac51ef695b921a9c2683c38c779d1050.tar.xz go-tangerine-d82cacf5ac51ef695b921a9c2683c38c779d1050.tar.zst go-tangerine-d82cacf5ac51ef695b921a9c2683c38c779d1050.zip |
core/vm: remove round from addDKG functions (#279)
* vendor: sync to latest core
* core/vm: remove addDKG functions
* core: fix conflict
Diffstat (limited to 'dex/db')
-rw-r--r-- | dex/db/db.go | 18 |
1 files changed, 9 insertions, 9 deletions
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 } |