예제 #1
0
def Test():
    t = MyTest(True)
    bitcoinConf = {
        "debug": ["blk", "mempool", "net", "req"],
        "blockprioritysize":
        2000000,  # we don't want any transactions rejected due to insufficient fees...
        "net.ignoreTimeouts": 1,
        "logtimemicros": 1
    }

    # you may want these flags:
    flags = ["--nocleanup", "--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("--tmpdir=/ramdisk/test/ma")

    # 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
    binpath = findBitcoind()
    flags.append("--srcdir=%s" % binpath)

    # load the cashlib.so from our build directory
    cashlib.init(binpath + os.sep + ".libs" + os.sep + "libbitcoincash.so")
    # start the test
    t.main(flags, bitcoinConf, None)
예제 #2
0
def Test():
    t = MyTest()
    bitcoinConf = {
        "debug": ["rpc", "net", "blk", "thin", "mempool", "req", "bench", "evict"],
    }

    flags = [] # ["--nocleanup", "--noshutdown"]
    if os.path.isdir("/ramdisk/test"):
        flags.append("--tmpdir=/ramdisk/test/cashlibtest")
    binpath = findBitcoind()
    flags.append("--srcdir=%s" % binpath)
    cashlib.init(binpath + os.sep + ".libs" + os.sep + "libbitcoincash.so")
    t.main(flags, bitcoinConf, None)
예제 #3
0
def Test():
    t = SchnorrSigTest()
    t.drop_to_pdb = True
    bitcoinConf = {
        "debug": ["net", "blk", "thin", "mempool", "req", "bench", "evict"],
        "blockprioritysize":
        2000000  # we don't want any transactions rejected due to insufficient fees...
    }

    flags = []  # ["--nocleanup", "--noshutdown"]
    if os.path.isdir("/ramdisk/test/t"):
        flags.append("--tmpdir=/ramdisk/test/t")
    binpath = findBitcoind()
    flags.append("--srcdir=%s" % binpath)
    cashlib.init(binpath + os.sep + ".libs" + os.sep + "libbitcoincash.so")

    t.main(flags, bitcoinConf, None)
예제 #4
0
def Test():
    t = MyTest()
    lkcoinseConf = {
        "debug": ["net", "blk", "thin", "mempool", "req", "bench", "evict"],
        "blockprioritysize":
        2000000  # we don't want any transactions rejected due to insufficient fees...
    }

    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("--tmpdir=/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

    objpath = None
    here = os.path.dirname(os.path.abspath(__file__))
    if not os.path.exists(os.path.abspath(here + "/../../src/lkcoinsed")):
        dbg = os.path.abspath(here + "/../../debug/src/lkcoinsed")
        rel = os.path.abspath(here + "/../../release/src/lkcoinsed")
        if os.path.exists(dbg):
            print("Running from the debug directory (%s)" % dbg)
            flags.append("--srcdir=%s" % os.path.dirname(dbg))
            objpath = 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))
            objpath = os.path.dirname(rel)
        cashlib.init(objpath + os.sep + ".libs" + os.sep +
                     "liblkcoinsecash.so")
    else:
        cashlib.init(
            os.path.abspath(here + "/../../src/.libs/liblkcoinsecash.so"))

    t.main(flags, lkcoinseConf, None)
예제 #5
0
    env = os.getenv("BITCOIND", None)
    path = None
    if env is None:
        for arg in sys.argv:
            if "srcdir" in arg:
                path = arg.split("=")[1]
                break
        if path is None:
            env = os.path.dirname(os.path.abspath(__file__))
            env = env + os.sep + ".." + os.sep + ".." + os.sep + "src" + os.sep + "bitcoind"
            env = os.path.abspath(env)
    if path is None:
        path = os.path.dirname(env)

    try:
        cashlib.init(path + os.sep + ".libs" + os.sep + "libbitcoincash.so")
        MyTest().main()
    except OSError as e:
        print(
            "Issue loading shared library.  This is expected during cross compilation since the native python will not load the .so: %s"
            % str(e))


# Create a convenient function for an interactive python debugging session
def Test():
    t = MyTest(True)
    bitcoinConf = {
        "debug": ["blk", "mempool", "net", "req"],
        "blockprioritysize":
        2000000,  # we don't want any transactions rejected due to insufficient fees...
        "net.ignoreTimeouts": 1,
예제 #6
0
        self.nodes[0].generate(1)

        self.sync_blocks()
        assert self.nodes[0].getmempoolinfo()["size"] == 0
        assert self.nodes[1].getmempoolinfo()["size"] == 0


if __name__ == '__main__':
    env = os.getenv("TRIPONED", None)
    if env is None:
        env = os.path.dirname(os.path.abspath(__file__))
        env = env + os.sep + ".." + os.sep + ".." + os.sep + "src" + os.sep + "triponed"
        env = os.path.abspath(env)
    path = os.path.dirname(env)
    try:
        cashlib.init(path + os.sep + ".libs" + os.sep + "libtriponecash.so")
        MyTest().main()
    except OSError as e:
        print("Issue loading shared library.  This is expected during cross compilation since the native python will not load the .so: %s" % str(e))

# Create a convenient function for an interactive python debugging session


def Test():
    t = MyTest()
    triponeConf = {
        "debug": ["net", "blk", "thin", "mempool", "req", "bench", "evict"],
        "blockprioritysize": 2000000  # we don't want any transactions rejected due to insufficient fees...
    }

    flags = []
예제 #7
0
        self.nodes[0].generate(1)

        self.sync_blocks()
        assert self.nodes[0].getmempoolinfo()["size"] == 0
        assert self.nodes[1].getmempoolinfo()["size"] == 0


if __name__ == '__main__':
    env = os.getenv("LKCOINSED", None)
    if env is None:
        env = os.path.dirname(os.path.abspath(__file__))
        env = env + os.sep + ".." + os.sep + ".." + os.sep + "src" + os.sep + "lkcoinsed"
        env = os.path.abspath(env)
    path = os.path.dirname(env)
    try:
        cashlib.init(path + os.sep + ".libs" + os.sep + "liblkcoinsecash.so")
        MyTest().main()
    except OSError as e:
        print(
            "Issue loading shared library.  This is expected during cross compilation since the native python will not load the .so: %s"
            % str(e))

# Create a convenient function for an interactive python debugging session


def Test():
    t = MyTest()
    lkcoinseConf = {
        "debug": ["net", "blk", "thin", "mempool", "req", "bench", "evict"],
        "blockprioritysize":
        2000000  # we don't want any transactions rejected due to insufficient fees...