Skip to content

Commit

Permalink
Replace ObjectsAreEqual and fix debug noise (for real)
Browse files Browse the repository at this point in the history
  • Loading branch information
chadlagore committed Aug 26, 2017
1 parent d246cb0 commit fe4a0d6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ func (a *App) RunMiner() {
miningResult := miner.Mine(a.Chain, blockToMine)

if miningResult.Complete {
// log.Debug("Successfully mined a block!")
log.Info("Successfully mined a block!")
push := msg.Push{
ResourceType: msg.ResourceBlock,
Resource: blockToMine,
Expand Down
6 changes: 3 additions & 3 deletions app/app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
)

func init() {
log.SetLevel(log.DebugLevel)
log.SetLevel(log.ErrorLevel)
}

func TestPushHandlerNewBlock(t *testing.T) {
Expand Down Expand Up @@ -47,7 +47,7 @@ func TestPushHandlerNewTestTransaction(t *testing.T) {
select {
case tr, ok := <-a.transactionQueue:
assert.True(t, ok)
assert.ObjectsAreEqual(tr, txn)
assert.Equal(t, tr, txn)
}
}

Expand Down Expand Up @@ -138,7 +138,7 @@ func TestHandleValidBlock(t *testing.T) {
bc, blk := blockchain.NewValidTestChainAndBlock()
a.Chain = bc
a.HandleBlock(blk)
assert.ObjectsAreEqual(blk, a.Chain.Blocks[2])
assert.Equal(t, blk, a.Chain.Blocks[3])

// TODO: Assert miner restarted.
// TODO: Assert pool appropriately emptied.
Expand Down
2 changes: 1 addition & 1 deletion pool/pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func TestGetAndSetTransaction(t *testing.T) {
tr := b.Transactions[1]
assert.Equal(t, p.Push(tr, bc), consensus.ValidTransaction)
assert.Equal(t, p.Size(), 1)
assert.ObjectsAreEqual(tr, p.Get(blockchain.HashSum(tr)))
assert.Equal(t, tr, p.Get(blockchain.HashSum(tr)))

p.Delete(tr)
assert.Equal(t, p.Size(), 0)
Expand Down

0 comments on commit fe4a0d6

Please sign in to comment.