From 09f943d9d4ebd151a8c6fdbd15ca3282edbc7e94 Mon Sep 17 00:00:00 2001 From: Mission Liao Date: Fri, 12 Oct 2018 19:36:32 +0800 Subject: core: modify interface (#194) * Add a new method to notify full node about round cutting. * Modify interface to return error when preparing block --- simulation/app.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'simulation/app.go') diff --git a/simulation/app.go b/simulation/app.go index 0e3e184..0ca65c9 100644 --- a/simulation/app.go +++ b/simulation/app.go @@ -98,18 +98,18 @@ func (a *simApp) getAckedBlocks(ackHash common.Hash) (output common.Hashes) { } // PreparePayload implements core.Application. -func (a *simApp) PreparePayload(position types.Position) []byte { - return []byte{} +func (a *simApp) PreparePayload(position types.Position) ([]byte, error) { + return []byte{}, nil } // PrepareWitness implements core.Application. -func (a *simApp) PrepareWitness(height uint64) types.Witness { +func (a *simApp) PrepareWitness(height uint64) (types.Witness, error) { a.latestWitnessReady.L.Lock() defer a.latestWitnessReady.L.Unlock() for a.latestWitness.Height < height { a.latestWitnessReady.Wait() } - return a.latestWitness + return a.latestWitness, nil } // StronglyAcked is called when a block is strongly acked by DEXON -- cgit v1.2.3