aboutsummaryrefslogtreecommitdiffstats
path: root/les/sync_test.go
diff options
context:
space:
mode:
authorgary rong <garyrong0905@gmail.com>2019-07-04 03:54:59 +0800
committerPéter Szilágyi <peterke@gmail.com>2019-07-04 03:54:59 +0800
commit68147971734ea1f89f7899b1ca595c2c57e67079 (patch)
tree7fdd84eeb011a1e01947af30400c9363b8236149 /les/sync_test.go
parent59a31983829ee542682b842e5b9b12b4cdac193d (diff)
downloadgo-tangerine-68147971734ea1f89f7899b1ca595c2c57e67079.tar
go-tangerine-68147971734ea1f89f7899b1ca595c2c57e67079.tar.gz
go-tangerine-68147971734ea1f89f7899b1ca595c2c57e67079.tar.bz2
go-tangerine-68147971734ea1f89f7899b1ca595c2c57e67079.tar.lz
go-tangerine-68147971734ea1f89f7899b1ca595c2c57e67079.tar.xz
go-tangerine-68147971734ea1f89f7899b1ca595c2c57e67079.tar.zst
go-tangerine-68147971734ea1f89f7899b1ca595c2c57e67079.zip
accounts, cmd, contracts, les: integrate clef for transaction signing (#19783)
* accounts, cmd, contracts, les: integrate clef for transaction signing * accounts, cmd/checkpoint-admin, signer/core: minor fixups
Diffstat (limited to 'les/sync_test.go')
-rw-r--r--les/sync_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/les/sync_test.go b/les/sync_test.go
index 634be8e6d..f5d1ad5bc 100644
--- a/les/sync_test.go
+++ b/les/sync_test.go
@@ -22,6 +22,7 @@ import (
"testing"
"time"
+ "github.com/ethereum/go-ethereum/accounts/abi/bind"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/light"
@@ -82,7 +83,7 @@ func testCheckpointSyncing(t *testing.T, protocol int, syncMode int) {
data := append([]byte{0x19, 0x00}, append(registrarAddr.Bytes(), append([]byte{0, 0, 0, 0, 0, 0, 0, 0}, cp.Hash().Bytes()...)...)...)
sig, _ := crypto.Sign(crypto.Keccak256(data), signerKey)
sig[64] += 27 // Transform V from 0/1 to 27/28 according to the yellow paper
- if _, err := server.pm.reg.contract.RegisterCheckpoint(signerKey, cp.SectionIndex, cp.Hash().Bytes(), new(big.Int).Sub(header.Number, big.NewInt(1)), header.ParentHash, [][]byte{sig}); err != nil {
+ if _, err := server.pm.reg.contract.RegisterCheckpoint(bind.NewKeyedTransactor(signerKey), cp.SectionIndex, cp.Hash().Bytes(), new(big.Int).Sub(header.Number, big.NewInt(1)), header.ParentHash, [][]byte{sig}); err != nil {
t.Error("register checkpoint failed", err)
}
server.backend.Commit()