Skip to content

Commit

Permalink
Update NBXplorer to version 2.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Kixunil committed Feb 10, 2024
1 parent 606cf9f commit 4872156
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 8 deletions.
2 changes: 1 addition & 1 deletion build_rules/nbxplorer.pin
Original file line number Diff line number Diff line change
@@ -1 +1 @@
cfb9aa95060f1aea7f0ed3ad068a502cc50edd3f
07b11932378cd28244b859f9a28de5dbf4a9caa7
2 changes: 1 addition & 1 deletion debcrafter-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
7bc4a47591b0d3a6daa564abd38643125e5724cc
b60342e0ba393599fa86690e2f76acf5e1325431
26 changes: 24 additions & 2 deletions pkg_specs/[email protected]
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ extra_service_config = """
Restart=always
"""

[databases.pgsql]
template = """
postgres=User ID=_DBC_DBUSER_;Password=_DBC_DBPASS_;Host=_DBC_DBSERVER_;Port=_DBC_DBPORT_;Database=_DBC_DBNAME_;
"""
min_version = "13"

[map_variants.mainnet_enabled]
mainnet = "1"
regtest = "0"
Expand All @@ -24,18 +30,34 @@ regtest = "24447"
[extra_groups."nbxplorer-{variant}-access-rpc"]
create = true

[migrations."<< 2.4.5-1"]
config = """
# This version started including secret information
chmod o-r /etc/nbxplorer-{variant}/nbxplorer.conf
"""

[config."nbxplorer.conf"]
format = "plain"
public = true
cat_dir = "conf.d"
cat_files = ["database"]

[config."nbxplorer.conf".hvars."network"]
type = "string"
template = "{variant}"

[config."nbxplorer.conf".hvars."automigrate"]
type = "uint"
constant = "1"

[config."nbxplorer.conf".ivars."deleteaftermigration"]
type = "bool"
default = "true"
priority = "low"
summary = "Delete old NBxplorer's database after migration"

[config."nbxplorer.conf".hvars."dbtrie"]
type = "string"
template = "1"
template = "0"

[config."nbxplorer.conf".ivars.datadir]
type = "path"
Expand Down
5 changes: 5 additions & 0 deletions pkg_specs/nbxplorer.changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
nbxplorer (2.4.5-1) buster; urgency=medium

* Updated upstream version

-- Martin Habovstiak <[email protected]> Sat, 06 Jan 2024 11:33:14 +0000
nbxplorer (2.3.66-1) buster; urgency=medium

* Updated upstream version
Expand Down
2 changes: 1 addition & 1 deletion pkg_specs/nbxplorer.sps
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "nbxplorer"
architecture = "any"
summary = "A minimalist UTXO tracker for HD Wallets."
depends = ["dotnet-runtime-6.0", "aspnetcore-runtime-6.0"]
depends = ["dotnet-runtime-8.0", "aspnetcore-runtime-8.0"]
recommends = ["bitcoin-mainnet | bitcoin-regtest, nbxplorer-mainnet | bitcoin-regtest, nbxplorer-regtest | bitcoin-mainnet, nbxplorer-both | nbxplorer-mainnet | nbxplorer-regtest"]
add_files = ["/usr/lib/NBXplorer"]
add_links = ["/usr/lib/NBXplorer/NBXplorer /usr/bin/nbxplorer"]
Expand Down
2 changes: 1 addition & 1 deletion pkg_specs/nbxplorer.sss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "nbxplorer"
section = "net"
variants = ["mainnet", "regtest"]
build_depends = ["dotnet-sdk-6.0:native"]
build_depends = ["dotnet-sdk-8.0:native"]
packages = ["nbxplorer", "nbxplorer-@variant", "nbxplorer-both"]
skip_debug_symbols = true
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import sys
from lnpbp_testkit.cadr import network
# This is not public, but we control the API, so let's break privacy for now
from lnpbp_testkit.parsing import parse_simple_config
from lnpbp_testkit.parsing import parse_simple_config_lines
import requests
from requests.auth import HTTPBasicAuth
import json
Expand All @@ -17,7 +17,8 @@ def eprint(msg):

class NBXplorer:
def __init__(self):
config = parse_simple_config("/etc/nbxplorer-regtest/nbxplorer.conf")
config = subprocess.run(["sudo", "cat", "/etc/nbxplorer-regtest/nbxplorer.conf"], stdout=subprocess.PIPE).stdout.decode("utf-8").split('\n')
config = parse_simple_config_lines(config)

self._port = config["port"]
cookie = subprocess.run(["sudo", "cat", "/var/lib/nbxplorer-regtest/RegTest/.cookie"], stdout=subprocess.PIPE)
Expand Down

0 comments on commit 4872156

Please sign in to comment.