For anyone running a VPS or using the daemon locally, here's a quick little python script for building your spreadcoin.conf. Much faster than buggering about guessing output numbers for multiple Masternodes.
1. Place magic.py (cut and paste the code at the bottom of this post into a text file called magic.py) in your .spreadtest2coin directory of your local machine. If it isn't already, place your spreadcoind daemon in there too.
2. Use the QT client to cut and paste all your MN outputs into a text file "outputs.conf" in the .spreadtest2coin directory - no blank lines, just one output on each line.
3. Close the QT client.
4. On your local machine, make sure you have a basic spreadcoin.conf in your /home/user/.spreadtest2coin directory:
rpcuser=you
rcpassword=blah
rpcallowip=127.0.0.1
server=1
daemon=1
5. Start spreadcoind on your local machine
./spreadcoind
6. Unlock your wallet if required
./spreadcoind walletpassphrase <passphrase> 60
7. Run magic.py - it will run 'mnsecret' for all the outputs in your outputs.txt and add the correct 'mnstart=...' line to your spreadcoin.conf.
python magic.py
8. Copy the generated spreadcoin.conf to your VPS:
scp spreadcoin.conf [email protected]:/home/user/.spreadtest2coin
9. Restart spreadcoind on your VPS to start all your Masternodes.
./spreadcoind stop
./spreadcoind
magic.py:
#!/usr/bin/python
import sys, os, subprocess
def magic():
m = 'outputs.txt'
with open(m, mode="r") as f:
a = [line.strip() for line in f]
for line in a:
try:
cmd = './spreadcoind mnsecret ' + line
print cmd
r = subprocess.check_output(cmd, shell=True)
print r
with open("spreadcoin.conf", mode="a") as conf:
conf.write("mnstart=" + str(r))
except:
print 'Error! - check spreadcoind is running, you have rpcuser=blah and rpcpassword=blahblah lines in your spreadcoin.conf, your wallet is unlocked and the outputs in your outputs.txt are yours. You will also get this error if you have blank lines in your outputs.txt.'
sys.exit()
magic()