Merge pull request #1246 from LeoHChen/quick_test_file_fix

[test] fix the test config file
pull/1250/head
Leo Chen 5 years ago committed by GitHub
commit f5a433eaac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      core/blockchain.go
  2. 2
      internal/configs/sharding/localnet.go
  3. 2
      internal/configs/sharding/mainnet.go
  4. 2
      internal/configs/sharding/testnet.go
  5. 14
      test/configs/local-resharding.txt
  6. 2
      test/deploy.sh
  7. 2
      test/kill_node.sh

@ -224,6 +224,7 @@ func (bc *BlockChain) ValidateNewBlock(block *types.Block) error {
}
// IsEpochBlock returns whether this block is the first block of an epoch.
// TODO: lc this is not used
func IsEpochBlock(block *types.Block) bool {
return block.NumberU64()%ShardingSchedule.BlocksPerEpoch() == 0
}

@ -48,6 +48,8 @@ func (ls localnetSchedule) CalcEpochNumber(blockNum uint64) *big.Int {
func (ls localnetSchedule) IsLastBlock(blockNum uint64) bool {
blocks := ls.BlocksPerEpoch()
switch {
case blockNum < localnetEpochBlock1-1:
return false
case blockNum == localnetEpochBlock1-1:
return true
default:

@ -44,6 +44,8 @@ func (ms mainnetSchedule) CalcEpochNumber(blockNum uint64) *big.Int {
func (ms mainnetSchedule) IsLastBlock(blockNum uint64) bool {
blocks := ms.BlocksPerEpoch()
switch {
case blockNum < mainnetEpochBlock1-1:
return false
case blockNum == mainnetEpochBlock1-1:
return true
default:

@ -49,6 +49,8 @@ func (ts testnetSchedule) CalcEpochNumber(blockNum uint64) *big.Int {
func (ts testnetSchedule) IsLastBlock(blockNum uint64) bool {
blocks := ts.BlocksPerEpoch()
switch {
case blockNum < testnetEpochBlock1-1:
return false
case blockNum == testnetEpochBlock1-1:
return true
default:

@ -15,17 +15,11 @@
127.0.0.1 9100 newnode one1ghkz3frhske7emk79p7v2afmj4a5t0kmjyt4s5 eca09c1808b729ca56f1b5a6a287c6e1c3ae09e29ccf7efa35453471fcab07d9f73cee249e2b91f5ee44eb9618be3904
127.0.0.1 9101 newnode one1d7jfnr6yraxnrycgaemyktkmhmajhp8kl0yahv f47238daef97d60deedbde5302d05dea5de67608f11f406576e363661f7dcbc4a1385948549b31a6c70f6fde8a391486
127.0.0.1 9102 newnode one1r4zyyjqrulf935a479sgqlpa78kz7zlcg2jfen fc4b9c535ee91f015efff3f32fbb9d32cdd9bfc8a837bb3eee89b8fff653c7af2050a4e147ebe5c7233dc2d5df06ee0a
127.0.0.1 9103 newnode one1p7ht2d4kl8ve7a8jxw746yfnx4wnfxtp8jqxwe ca86e551ee42adaaa6477322d7db869d3e203c00d7b86c82ebee629ad79cb6d57b8f3db28336778ec2180e56a8e07296
127.0.0.1 9104 newnode one1z05g55zamqzfw9qs432n33gycdmyvs38xjemyl 95117937cd8c09acd2dfae847d74041a67834ea88662a7cbed1e170350bc329e53db151e5a0ef3e712e35287ae954818
127.0.0.1 9105 newnode one1ljznytjyn269azvszjlcqvpcj6hjm822yrcp2e 68ae289d73332872ec8d04ac256ca0f5453c88ad392730c5741b6055bc3ec3d086ab03637713a29f459177aaa8340615
127.0.0.1 9107 one1uyshu2jgv8w465yc8kkny36thlt2wvel89tcmg 1c1fb28d2de96e82c3d9b4917eb54412517e2763112a3164862a6ed627ac62e87ce274bb4ea36e6a61fb66a15c263a06
127.0.0.1 9108 one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7 b179c4fdc0bee7bd0b6698b792837dd13404d3f985b59d4a9b1cd0641a76651e271518b61abbb6fbebd4acf963358604
127.0.0.1 9110 one1d2rngmem4x2c6zxsjjz29dlah0jzkr0k2n88wc 16513c487a6bb76f37219f3c2927a4f281f9dd3fd6ed2e3a64e500de6545cf391dd973cc228d24f9bd01efe94912e714
127.0.0.1 9109 one1658znfwf40epvy7e46cqrmzyy54h4n0qa73nep 576d3c48294e00d6be4a22b07b66a870ddee03052fe48a5abbd180222e5d5a1f8946a78d55b025de21635fd743bbad90
127.0.0.1 9107 newnode one1uyshu2jgv8w465yc8kkny36thlt2wvel89tcmg 1c1fb28d2de96e82c3d9b4917eb54412517e2763112a3164862a6ed627ac62e87ce274bb4ea36e6a61fb66a15c263a06
127.0.0.1 9108 newnode one103q7qe5t2505lypvltkqtddaef5tzfxwsse4z7 b179c4fdc0bee7bd0b6698b792837dd13404d3f985b59d4a9b1cd0641a76651e271518b61abbb6fbebd4acf963358604
127.0.0.1 9109 newnode one1658znfwf40epvy7e46cqrmzyy54h4n0qa73nep 576d3c48294e00d6be4a22b07b66a870ddee03052fe48a5abbd180222e5d5a1f8946a78d55b025de21635fd743bbad90
127.0.0.1 9110 newnode one1d2rngmem4x2c6zxsjjz29dlah0jzkr0k2n88wc 16513c487a6bb76f37219f3c2927a4f281f9dd3fd6ed2e3a64e500de6545cf391dd973cc228d24f9bd01efe94912e714

@ -36,7 +36,7 @@ function cleanup() {
$DRYRUN kill -9 $pid 2> /dev/null
done
rm -rf ./db/harmony_*
rm -rf ./db*
rm -rf ./db-127.0.0.1-*
}
function killnode() {

@ -5,3 +5,5 @@ do
echo 'Killed process: '$pid
kill -9 $pid
done
rm -rf db-127.0.0.1-*

Loading…
Cancel
Save