Skip to content

Commit

Permalink
Merge branch 'master' into fastsync
Browse files Browse the repository at this point in the history
  • Loading branch information
jieyilong committed Dec 7, 2019
2 parents c2c5c6b + a17d359 commit 47d037f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion consensus/engine_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func TestSingleBlockValidation(t *testing.T) {
invalidBlock.Signature, _ = privKey.Sign(invalidBlock.SignBytes())
res = ce.validateBlock(invalidBlock, chain.Root())
require.True(res.IsError(), "Missing height")
require.Equal("Block height is incorrect", res.Message)
require.Equal("Block is older than last finalized block", res.Message)

invalidBlock = core.NewBlock()
invalidBlock.ChainID = chain.ChainID
Expand Down
7 changes: 2 additions & 5 deletions netsync/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,10 @@ package netsync
import (
"context"
"testing"
"time"

"github.com/thetatoken/theta/consensus"
"github.com/thetatoken/theta/core"
"github.com/thetatoken/theta/crypto"
"github.com/thetatoken/theta/ledger"
"github.com/thetatoken/theta/rlp"
"github.com/thetatoken/theta/store/database/backend"
"github.com/thetatoken/theta/store/kvstore"

"github.com/thetatoken/theta/common"
"github.com/thetatoken/theta/dispatcher"
Expand Down Expand Up @@ -57,6 +52,7 @@ func (m *MockMsgHandler) HandleMessage(message types.Message) error {
return nil
}

/*
func TestSyncManager(t *testing.T) {
assert := assert.New(t)
core.ResetTestBlocks()
Expand Down Expand Up @@ -164,6 +160,7 @@ func TestSyncManager(t *testing.T) {
assert.Equal(core.GetTestBlock(expected[i]).Hash(), msg.(*core.Block).Hash())
}
}
*/

type MockConsensus struct {
chain *blockchain.Chain
Expand Down

0 comments on commit 47d037f

Please sign in to comment.