This repository has been archived by the owner on Feb 1, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge version 0.2.5.18 from dev
- Loading branch information
Showing
60 changed files
with
1,802 additions
and
880 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
name: "eccoin-linux-0.2.5.17" | ||
name: "eccoin-linux-0.2.5.18" | ||
enable_cache: true | ||
suites: | ||
- "bionic" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
name: "eccoin-linux-0.2.5.17" | ||
name: "eccoin-linux-0.2.5.18" | ||
enable_cache: true | ||
suites: | ||
- "bionic" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
name: "eccoin-osx-0.2.5.17" | ||
name: "eccoin-osx-0.2.5.18" | ||
enable_cache: true | ||
suites: | ||
- "bionic" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
name: "eccoin-win-0.2.5.17" | ||
name: "eccoin-win-0.2.5.18" | ||
enable_cache: true | ||
suites: | ||
- "bionic" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,117 @@ | ||
#!/usr/bin/env python3 | ||
# Copyright (c) 2015-2018 The Bitcoin Unlimited developers | ||
# Distributed under the MIT software license, see the accompanying | ||
# file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
import test_framework.loginit | ||
# This is a template to make creating new QA tests easy. | ||
# You can also use this template to quickly start and connect a few regtest nodes. | ||
|
||
import time | ||
import sys | ||
if sys.version_info[0] < 3: | ||
raise "Use Python 3" | ||
import logging | ||
|
||
from test_framework.test_framework import BitcoinTestFramework | ||
from test_framework.util import * | ||
|
||
class AodvTest (BitcoinTestFramework): | ||
|
||
def setup_chain(self,bitcoinConfDict=None, wallets=None): | ||
print("Initializing test directory "+self.options.tmpdir) | ||
# pick this one to start from the cached 4 node 100 blocks mined configuration | ||
# initialize_chain(self.options.tmpdir) | ||
# pick this one to start at 0 mined blocks | ||
initialize_chain_clean(self.options.tmpdir, 6, bitcoinConfDict, wallets) | ||
# Number of nodes to initialize ----------> ^ | ||
|
||
def setup_network(self, split=False): | ||
self.nodes = start_nodes(6, self.options.tmpdir) | ||
connect_nodes_bi(self.nodes,0,1) | ||
connect_nodes_bi(self.nodes,1,2) | ||
connect_nodes_bi(self.nodes,2,3) | ||
connect_nodes_bi(self.nodes,3,4) | ||
connect_nodes_bi(self.nodes,4,5) | ||
self.is_network_split=False | ||
self.sync_all() | ||
|
||
def run_test (self): | ||
self.sync_blocks() | ||
|
||
for x in range(0, 1): | ||
self.nodes[0].generate(1); | ||
self.sync_blocks() | ||
|
||
assert_not_equal(self.nodes[0].getconnectioncount(), 3) | ||
print(self.nodes[0].getconnectioncount()) | ||
print(self.nodes[0].getaodvtable()) | ||
assert_not_equal(self.nodes[1].getconnectioncount(), 3) | ||
print(self.nodes[1].getconnectioncount()) | ||
assert_not_equal(self.nodes[2].getconnectioncount(), 3) | ||
print(self.nodes[2].getconnectioncount()) | ||
assert_not_equal(self.nodes[3].getconnectioncount(), 3) | ||
print(self.nodes[3].getconnectioncount()) | ||
|
||
key0 = self.nodes[0].getroutingpubkey() | ||
key1 = self.nodes[1].getroutingpubkey() | ||
key2 = self.nodes[2].getroutingpubkey() | ||
key3 = self.nodes[3].getroutingpubkey() | ||
key4 = self.nodes[4].getroutingpubkey() | ||
key5 = self.nodes[5].getroutingpubkey() | ||
|
||
self.nodes[0].findroute(key0) | ||
time.sleep(1) | ||
assert_equal(self.nodes[0].haveroute(key0), True) | ||
self.nodes[0].findroute(key1) | ||
time.sleep(1) | ||
assert_equal(self.nodes[0].haveroute(key1), True) | ||
self.nodes[0].findroute(key2) | ||
time.sleep(1) | ||
assert_equal(self.nodes[0].haveroute(key2), True) | ||
self.nodes[0].findroute(key3) | ||
time.sleep(1) | ||
assert_equal(self.nodes[0].haveroute(key3), True) | ||
self.nodes[0].findroute(key4) | ||
time.sleep(1) | ||
assert_equal(self.nodes[0].haveroute(key4), True) | ||
self.nodes[0].findroute(key5) | ||
time.sleep(1) | ||
assert_equal(self.nodes[0].haveroute(key5), True) | ||
|
||
|
||
if __name__ == '__main__': | ||
AodvTest().main(bitcoinConfDict={"beta": 1}) | ||
|
||
# Create a convenient function for an interactive python debugging session | ||
def Test(): | ||
t = AodvTest() | ||
bitcoinConf = { | ||
"debug": ["net", "blk", "thin", "mempool", "req", "bench", "evict"], | ||
"blockprioritysize": 2000000, # we don't want any transactions rejected due to insufficient fees... | ||
"beta": 1 | ||
} | ||
|
||
|
||
flags = [] | ||
# you may want these additional flags: | ||
# flags.append("--nocleanup") | ||
# flags.append("--noshutdown") | ||
|
||
# Execution is much faster if a ramdisk is used, so use it if one exists in a typical location | ||
if os.path.isdir("/ramdisk/test"): | ||
flags.append("--tmppfx=/ramdisk/test") | ||
|
||
# Out-of-source builds are awkward to start because they need an additional flag | ||
# automatically add this flag during testing for common out-of-source locations | ||
here = os.path.dirname(os.path.abspath(__file__)) | ||
if not os.path.exists(os.path.abspath(here + "/../../src/eccoind")): | ||
dbg = os.path.abspath(here + "/../../debug/src/eccoind") | ||
rel = os.path.abspath(here + "/../../release/src/eccoind") | ||
if os.path.exists(dbg): | ||
print("Running from the debug directory (%s)" % dbg) | ||
flags.append("--srcdir=%s" % os.path.dirname(dbg)) | ||
elif os.path.exists(rel): | ||
print("Running from the release directory (%s)" % rel) | ||
flags.append("--srcdir=%s" % os.path.dirname(rel)) | ||
|
||
t.main(flags, bitcoinConf, None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// This file is part of the Eccoin project | ||
// Copyright (c) 2019 The Eccoin developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
#include "beta.h" | ||
|
||
std::atomic<bool> fBeta{DEFAULT_BETA_ENABLED}; | ||
|
||
bool IsBetaEnabled() | ||
{ | ||
return fBeta.load(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// This file is part of the Eccoin project | ||
// Copyright (c) 2019 The Eccoin developers | ||
// Distributed under the MIT software license, see the accompanying | ||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||
|
||
#ifndef ECCOIN_BETA_H | ||
#define ECCOIN_BETA_H | ||
|
||
#include <atomic> | ||
|
||
static const bool DEFAULT_BETA_ENABLED = false; | ||
|
||
extern std::atomic<bool> fBeta; | ||
|
||
bool IsBetaEnabled(); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.