- Fix get_next_address_index: use try_get::<i32> for PG SERIAL/INTEGER columns - Fix search_tx: use try_get::<i32> for PG status column - Fix execute_insert: parse locktime (String→i64) and in_vout (String→i32) before binding to PG INTEGER columns - Fix execute_insert: bind tbl_out vout as i32, amount as String for PG - Fix save_new_address: cast xpub i64 to i32 for PG INTEGER column - Fix get_pending_txs: cast i64 bind params to i32, use try_get::<i32> for reads - Fix get_stats: use try_get::<i32> for all numeric PG INTEGER columns - Add trace logging in parse_request_transactions for xpub address matching - Add trace logging in get_all_addresses_by_xpub for query debugging
56 lines
1.4 KiB
Desktop File
56 lines
1.4 KiB
Desktop File
# /etc/systemd/system/tbitcoind.service
|
|
|
|
[Unit]
|
|
Description=Bitcoin Testnet daemon
|
|
After=network.target
|
|
|
|
[Service]
|
|
|
|
# Service execution
|
|
###################
|
|
|
|
ExecStart=/usr/local/bin/bitcoind -daemon -testnet \
|
|
-pid=/run/tbitcoind/tbitcoind.pid \
|
|
-conf=/home/bitcoin/.bitcoin/bitcoin.conf \
|
|
-datadir=/home/bitcoin/.bitcoin \
|
|
-startupnotify="chmod g+r /home/bitcoin/.bitcoin/testnet3/.cookie"
|
|
|
|
# Process management
|
|
####################
|
|
Type=forking
|
|
PIDFile=/run/tbitcoind/tbitcoind.pid
|
|
Restart=on-failure
|
|
TimeoutSec=300
|
|
RestartSec=30
|
|
|
|
# Directory creation and permissions
|
|
####################################
|
|
User=bitcoin
|
|
UMask=0027
|
|
|
|
# /run/tbitcoind
|
|
RuntimeDirectory=tbitcoind
|
|
RuntimeDirectoryMode=0710
|
|
|
|
# Hardening measures
|
|
####################
|
|
# Provide a private /tmp and /var/tmp.
|
|
PrivateTmp=true
|
|
|
|
# Mount /usr, /boot/ and /etc read-only for the process.
|
|
ProtectSystem=full
|
|
|
|
# Disallow the process and all of its children to gain
|
|
# new privileges through execve().
|
|
NoNewPrivileges=true
|
|
|
|
# Use a new /dev namespace only populated with API pseudo devices
|
|
# such as /dev/null, /dev/zero and /dev/random.
|
|
PrivateDevices=true
|
|
|
|
# Deny the creation of writable and executable memory mappings.
|
|
MemoryDenyWriteExecute=true
|
|
|
|
[Install]
|
|
WantedBy=multi-user.target
|