aboutsummaryrefslogtreecommitdiffstats
path: root/dex
diff options
context:
space:
mode:
authorWei-Ning Huang <w@cobinhood.com>2018-10-04 17:01:32 +0800
committerWei-Ning Huang <w@dexon.org>2019-04-09 21:32:49 +0800
commit6f442cd7793daad014aa0d55b3b7320392c22f02 (patch)
treeb786b698c609273a36b90b6150b0cd2eaa2bde08 /dex
parentb67ef6594e03b45bb9e683631a7bf9584f6a3437 (diff)
downloaddexon-6f442cd7793daad014aa0d55b3b7320392c22f02.tar.gz
dexon-6f442cd7793daad014aa0d55b3b7320392c22f02.tar.zst
dexon-6f442cd7793daad014aa0d55b3b7320392c22f02.zip
core: vm: implement the rest of governance contract methods
Diffstat (limited to 'dex')
-rw-r--r--dex/app.go10
-rw-r--r--dex/governance.go2
-rw-r--r--dex/network.go8
3 files changed, 16 insertions, 4 deletions
diff --git a/dex/app.go b/dex/app.go
index dee762540..a8b04577d 100644
--- a/dex/app.go
+++ b/dex/app.go
@@ -35,9 +35,13 @@ func NewDexconApp(txPool *core.TxPool) *DexconApp {
}
// PreparePayload is called when consensus core is preparing a block.
-func (d *DexconApp) PrepareBlock(position types.Position) (
- payload []byte, witnessData []byte) {
- return nil, nil
+func (d *DexconApp) PreparePayload(position types.Position) []byte {
+ return nil
+}
+
+// PrepareWitness will return the witness data no lower than consensusHeight.
+func (d *DexconApp) PrepareWitness(consensusHeight uint64) types.Witness {
+ return types.Witness{}
}
// VerifyPayload verifies if the payloads are valid.
diff --git a/dex/governance.go b/dex/governance.go
index 95109690a..5ee307b88 100644
--- a/dex/governance.go
+++ b/dex/governance.go
@@ -26,7 +26,7 @@ func (d *DexconGovernance) CRS(round uint64) coreCommon.Hash {
}
// ProposeCRS send proposals of a new CRS
-func (d *DexconGovernance) ProposeCRS(round uint64, signedCRS []byte) {
+func (d *DexconGovernance) ProposeCRS(signedCRS []byte) {
}
// NodeSet returns the current notary set.
diff --git a/dex/network.go b/dex/network.go
index a186921a4..c3a0ef792 100644
--- a/dex/network.go
+++ b/dex/network.go
@@ -23,6 +23,14 @@ func (n *DexconNetwork) BroadcastVote(vote *types.Vote) {
func (n *DexconNetwork) BroadcastBlock(block *types.Block) {
}
+// BroadcastRandomnessRequest broadcasts rand request to DKG set.
+func (n *DexconNetwork) BroadcastRandomnessRequest(randRequest *types.AgreementResult) {
+}
+
+// BroadcastRandomnessResult broadcasts rand request to Notary set.
+func (n *DexconNetwork) BroadcastRandomnessResult(randResult *types.BlockRandomnessResult) {
+}
+
// SendDKGPrivateShare sends PrivateShare to a DKG participant.
func (n *DexconNetwork) SendDKGPrivateShare(
pub crypto.PublicKey, prvShare *types.DKGPrivateShare) {