Add Greg Maxwell's banlist to bitcoind postStart

This commit is contained in:
nixbitcoin
2019-03-21 10:11:18 +01:00
parent 022ba88450
commit fbc78ce6ed
5 changed files with 696 additions and 0 deletions
+4
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}";