Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiquan911 committed Aug 10, 2019
1 parent acfeb60 commit a85d0ab
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 5 deletions.
4 changes: 2 additions & 2 deletions beam/blockscanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,12 @@ func (bs *BEAMBlockScanner) ScanBlockTask() {
}

if remoteBlock.Found == false {
bs.wm.Log.Std.Error("remote server block is not synced to the same height of mainnet")
bs.wm.Log.Std.Warn("remote server block is not synced to the same height of mainnet")
break
}

if remoteBlock.Hash != block.Hash {
bs.wm.Log.Std.Error("remote server block is not synced to the same hash of mainnet")
bs.wm.Log.Std.Warn("remote server block is not synced to the same hash of mainnet")
break
}

Expand Down
15 changes: 13 additions & 2 deletions openwtester/manger_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package openwtester

import (
"fmt"
"github.com/blocktree/openwallet/log"
"github.com/blocktree/openwallet/openwallet"
"testing"
Expand Down Expand Up @@ -67,11 +68,21 @@ func TestGetRemoteWalletAddress(t *testing.T) {
return
}

for i, a := range addrs {
log.Infof("%d: %s", i, a)
for _, a := range addrs {
fmt.Printf("%s\n", a)
}
}

func TestGetRemoteBlockByHeight(t *testing.T) {
block, err := clientNode.GetRemoteBlockByHeight(313212)
if err != nil {
t.Errorf("CreateRemoteWalletAddress failed unexpected error: %v\n", err)
return
}

log.Infof("%+v", block)
}

func TestSendTransaction(t *testing.T) {

rawTx := &openwallet.RawTransaction{
Expand Down
2 changes: 1 addition & 1 deletion openwtester/subscribe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func TestSubscribeAddress(t *testing.T) {

//log.Debug("already got scanner:", assetsMgr)
scanner := clientNode.GetBlockScanner()
scanner.SetRescanBlockHeight(237304)
//scanner.SetRescanBlockHeight(237304)

if scanner == nil {
log.Error(symbol, "is not support block scan")
Expand Down

0 comments on commit a85d0ab

Please sign in to comment.