aboutsummaryrefslogtreecommitdiffstats
path: root/dex/db
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2019-03-21 08:37:33 +0800
committerGitHub <noreply@github.com>2019-03-21 08:37:33 +0800
commitacc1494299427a2461956307a2586192ad0a5d83 (patch)
tree69a90b6effbd3aeea07819d6c0efafc8187e3747 /dex/db
parenta13464c2482971712350fe41a58ea8b30ec0c361 (diff)
downloaddexon-acc1494299427a2461956307a2586192ad0a5d83.tar
dexon-acc1494299427a2461956307a2586192ad0a5d83.tar.gz
dexon-acc1494299427a2461956307a2586192ad0a5d83.tar.bz2
dexon-acc1494299427a2461956307a2586192ad0a5d83.tar.lz
dexon-acc1494299427a2461956307a2586192ad0a5d83.tar.xz
dexon-acc1494299427a2461956307a2586192ad0a5d83.tar.zst
dexon-acc1494299427a2461956307a2586192ad0a5d83.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.go18
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 }