aboutsummaryrefslogtreecommitdiffstats
path: root/dex/app.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@cobinhood.com>2018-09-26 11:00:04 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:23:38 +0800
commit593c5d4c9efa80916cc4819797bfc42348a43502 (patch)
treeaa76753d1422ac664e9dd62b149458fdd294ada2 /dex/app.go
parent21cbe9d5b1630be351329a5715fd599030a00122 (diff)
downloadgo-tangerine-593c5d4c9efa80916cc4819797bfc42348a43502.tar
go-tangerine-593c5d4c9efa80916cc4819797bfc42348a43502.tar.gz
go-tangerine-593c5d4c9efa80916cc4819797bfc42348a43502.tar.bz2
go-tangerine-593c5d4c9efa80916cc4819797bfc42348a43502.tar.lz
go-tangerine-593c5d4c9efa80916cc4819797bfc42348a43502.tar.xz
go-tangerine-593c5d4c9efa80916cc4819797bfc42348a43502.tar.zst
go-tangerine-593c5d4c9efa80916cc4819797bfc42348a43502.zip
dex: update consensus core interface
Diffstat (limited to 'dex/app.go')
-rw-r--r--dex/app.go22
1 files changed, 5 insertions, 17 deletions
diff --git a/dex/app.go b/dex/app.go
index ab807e644..dee762540 100644
--- a/dex/app.go
+++ b/dex/app.go
@@ -26,37 +26,25 @@ import (
// DexconApp implementes the DEXON consensus core application interface.
type DexconApp struct {
txPool *core.TxPool
-
- witnessResultChan chan types.WitnessResult
}
func NewDexconApp(txPool *core.TxPool) *DexconApp {
return &DexconApp{
- txPool: txPool,
- witnessResultChan: make(chan types.WitnessResult),
+ txPool: txPool,
}
}
// PreparePayload is called when consensus core is preparing a block.
-func (d *DexconApp) PreparePayload(position types.Position) []byte {
- return nil
+func (d *DexconApp) PrepareBlock(position types.Position) (
+ payload []byte, witnessData []byte) {
+ return nil, nil
}
// VerifyPayload verifies if the payloads are valid.
-func (d *DexconApp) VerifyPayload(payload []byte) bool {
+func (d *DexconApp) VerifyBlock(block *types.Block) bool {
return true
}
// BlockDelivered is called when a block is add to the compaction chain.
func (d *DexconApp) BlockDelivered(block types.Block) {
}
-
-// BlockProcessedChan returns a channel to receive the block hashes that have
-// finished processing by the application.
-func (d *DexconApp) BlockProcessedChan() <-chan types.WitnessResult {
- return d.witnessResultChan
-}
-
-// WitnessAckDeliver is called when a notary ack is created.
-func (d *DexconApp) WitnessAckDelivered(notaryAck *types.WitnessAck) {
-}