trustedcoin: add regtest support, reenable test
This commit is contained in:
@@ -1,15 +1,25 @@
|
|||||||
{ lib, buildGoModule, fetchFromGitHub }:
|
{ lib, buildGoModule, fetchFromGitHub, fetchpatch }:
|
||||||
|
|
||||||
buildGoModule rec {
|
buildGoModule rec {
|
||||||
pname = "trustedcoin";
|
pname = "trustedcoin";
|
||||||
version = "0.6.1";
|
version = "0.6.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "nbd-wtf";
|
owner = "nbd-wtf";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-UNQjxhAT0mK1In7vUtIoMoMNBV+0wkrwbDmm7m+0R3o=";
|
hash = "sha256-UNQjxhAT0mK1In7vUtIoMoMNBV+0wkrwbDmm7m+0R3o=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# https://github.com/nbd-wtf/trustedcoin/pull/22 required for regtest
|
||||||
|
(fetchpatch {
|
||||||
|
name = "add-regtest-support";
|
||||||
|
url = "https://github.com/nbd-wtf/trustedcoin/commit/aba05c55ccbfc50785328f556be8a5bd46e76beb.patch";
|
||||||
|
hash = "sha256-24mYyXjUMVSlr9IlaqaTVAPE6bxxScNgR8Bb3x2t90Y=";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
vendorSha256 = "sha256-xvkK9rMQlXTnNyOMd79qxVSvhgPobcBk9cq4/YWbupY=";
|
vendorSha256 = "sha256-xvkK9rMQlXTnNyOMd79qxVSvhgPobcBk9cq4/YWbupY=";
|
||||||
|
|
||||||
subPackages = [ "." ];
|
subPackages = [ "." ];
|
||||||
|
|||||||
@@ -295,11 +295,7 @@ buildable=(
|
|||||||
clightning-replication
|
clightning-replication
|
||||||
lndPruned
|
lndPruned
|
||||||
wireguard-lndconnect
|
wireguard-lndconnect
|
||||||
|
trustedcoin
|
||||||
# TODO-EXTERNAL:
|
|
||||||
# Reenable when this has been fixed:
|
|
||||||
# https://github.com/nbd-wtf/trustedcoin/issues/21
|
|
||||||
# trustedcoin
|
|
||||||
)
|
)
|
||||||
buildable() { buildTests buildable "$@"; }
|
buildable() { buildTests buildable "$@"; }
|
||||||
|
|
||||||
|
|||||||
@@ -319,6 +319,8 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
trustedcoin = {
|
trustedcoin = {
|
||||||
|
imports = [ scenarios.regtestBase ];
|
||||||
|
|
||||||
services.clightning = {
|
services.clightning = {
|
||||||
enable = true;
|
enable = true;
|
||||||
plugins.trustedcoin.enable = true;
|
plugins.trustedcoin.enable = true;
|
||||||
|
|||||||
@@ -435,6 +435,11 @@ def _():
|
|||||||
machine.wait_for_unit("clightning")
|
machine.wait_for_unit("clightning")
|
||||||
expect_clightning_log("plugin-trustedcoin[^^]\[0m\s+bitcoind RPC working")
|
expect_clightning_log("plugin-trustedcoin[^^]\[0m\s+bitcoind RPC working")
|
||||||
expect_clightning_log("plugin-trustedcoin[^^]\[0m\s+estimatefees error: none of the esploras returned usable responses")
|
expect_clightning_log("plugin-trustedcoin[^^]\[0m\s+estimatefees error: none of the esploras returned usable responses")
|
||||||
|
if "regtest" in enabled_tests:
|
||||||
|
num_blocks = test_data["num_blocks"]
|
||||||
|
expect_clightning_log(f"plugin-trustedcoin[^^]\[0m\s+tip: {num_blocks}")
|
||||||
|
expect_clightning_log("plugin-trustedcoin[^^]\[0m\s+returning block")
|
||||||
|
|
||||||
|
|
||||||
if "netns-isolation" in enabled_tests:
|
if "netns-isolation" in enabled_tests:
|
||||||
def ip(name):
|
def ip(name):
|
||||||
|
|||||||
Reference in New Issue
Block a user