Add Greg Maxwell's banlist to bitcoind postStart

This commit is contained in:
nixbitcoin 2019-03-20 16:33:40 +01:00
parent 022ba88450
commit fbc78ce6ed
No known key found for this signature in database
GPG key ID: DD11F9AD5308B3BA
5 changed files with 696 additions and 0 deletions

View file

@ -196,6 +196,10 @@ in {
chown '${cfg.user}:${cfg.group}' '${cfg.dataDir}/bitcoin.conf'
echo "rpcpassword=$(cat /secrets/bitcoin-rpcpassword)" >> '${cfg.dataDir}/bitcoin.conf'
'';
postStart = ''
until '${cfg.package}'/bin/bitcoin-cli -datadir='${cfg.dataDir}' getnetworkinfo; do sleep 1; done
'${pkgs.banlist}'/bin/banlist ${pkgs.altcoins.bitcoind}
'';
serviceConfig = {
Type = "simple";
User = "${cfg.user}";