diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-10-12 19:36:32 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-12 19:36:32 +0800 |
commit | 09f943d9d4ebd151a8c6fdbd15ca3282edbc7e94 (patch) | |
tree | 61eb287e8119f0de7670cb7a98dfa35cd431cc82 /core/test | |
parent | 48f5fdb27e3218e2476b27ae99bcf242533b3bc3 (diff) | |
download | tangerine-consensus-09f943d9d4ebd151a8c6fdbd15ca3282edbc7e94.tar tangerine-consensus-09f943d9d4ebd151a8c6fdbd15ca3282edbc7e94.tar.gz tangerine-consensus-09f943d9d4ebd151a8c6fdbd15ca3282edbc7e94.tar.bz2 tangerine-consensus-09f943d9d4ebd151a8c6fdbd15ca3282edbc7e94.tar.lz tangerine-consensus-09f943d9d4ebd151a8c6fdbd15ca3282edbc7e94.tar.xz tangerine-consensus-09f943d9d4ebd151a8c6fdbd15ca3282edbc7e94.tar.zst tangerine-consensus-09f943d9d4ebd151a8c6fdbd15ca3282edbc7e94.zip |
core: modify interface (#194)
* Add a new method to notify full node about round cutting.
* Modify interface to return error when preparing block
Diffstat (limited to 'core/test')
-rw-r--r-- | core/test/app.go | 8 | ||||
-rw-r--r-- | core/test/governance.go | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/core/test/app.go b/core/test/app.go index 60bc26f..d9582c9 100644 --- a/core/test/app.go +++ b/core/test/app.go @@ -97,15 +97,15 @@ func NewApp() *App { } // PreparePayload implements Application interface. -func (app *App) PreparePayload(position types.Position) []byte { - return []byte{} +func (app *App) PreparePayload(position types.Position) ([]byte, error) { + return []byte{}, nil } // PrepareWitness implements Application interface. -func (app *App) PrepareWitness(height uint64) types.Witness { +func (app *App) PrepareWitness(height uint64) (types.Witness, error) { return types.Witness{ Height: height, - } + }, nil } // VerifyBlock implements Application. diff --git a/core/test/governance.go b/core/test/governance.go index de0ec21..88aab37 100644 --- a/core/test/governance.go +++ b/core/test/governance.go @@ -115,6 +115,10 @@ func (g *Governance) CRS(round uint64) common.Hash { return g.crs[round] } +// NotifyRoundHeight notifies governace contract to snapshot config. +func (g *Governance) NotifyRoundHeight(round, height uint64) { +} + // ProposeCRS propose a CRS. func (g *Governance) ProposeCRS(signedCRS []byte) { g.lock.Lock() |