mempool: add module

This commit is contained in:
Erik Arvstedt 2023-08-06 21:07:51 +02:00
parent f0bf94cc5a
commit 1de259485b
No known key found for this signature in database
GPG key ID: 33312B944DD97846
13 changed files with 435 additions and 7 deletions

View file

@ -94,4 +94,15 @@ with lib;
test.container.enableWAN = true;
};
mempool-regtest = {
imports = [
scenarios.regtestBase
];
services.mempool = {
enable = true;
frontend.address = "0.0.0.0";
};
nix-bitcoin.nodeinfo.enable = true;
};
}

22
dev/topics/mempool.sh Normal file
View file

@ -0,0 +1,22 @@
# Start mempool container
run-tests.sh -s mempool-regtest container
c systemctl status mempool
c systemctl status mysql
c nodeinfo
# Check backend
c curl -fsS localhost:8999/api/v1/blocks/1 | jq
c curl -fsS localhost:8999/api/v1/blocks/tip/height | jq
c curl -fsS localhost:8999/api/v1/address/1CGG9qVq2P6F7fo6sZExvNq99Jv2GDpaLE | jq
# Check frontend
c curl -fsS localhost:60845
c curl -fsS localhost:60845/api/mempool | jq
c curl -fsS localhost:60845/api/blocks/1 | jq
c curl -fsS localhost:60845/api/v1/blocks/1 | jq
c curl -fsS localhost:60845/api/blocks/tip/height | jq
# Open frontend
# shellcheck disable=SC2154
runuser -u "$(logname)" -- xdg-open "http://$ip:60845/"