Browse Source

spv beer, pizza, vote; elections missing var check

v0.25
pbca26 7 years ago
parent
commit
f76427922f
  1. 33
      routes/electrumjs/electrumServers.js
  2. 16
      routes/shepherd/elections.js
  3. 6
      routes/shepherd/electrum/network.js

33
routes/electrumjs/electrumServers.js

@ -158,6 +158,39 @@ let electrumServers = {
'electrum2.cipig.net:10020' 'electrum2.cipig.net:10020'
], ],
}, },
beer: { // !estimatefee
address: 'electrum1.cipig.net',
port: 10022,
proto: 'tcp',
txfee: 10000,
abbr: 'BEER',
serverList: [
'electrum1.cipig.net:10022',
'electrum2.cipig.net:10022'
],
},
pizza: { // !estimatefee
address: 'electrum1.cipig.net',
port: 10024,
proto: 'tcp',
txfee: 10000,
abbr: 'PIZZA',
serverList: [
'electrum1.cipig.net:10024',
'electrum2.cipig.net:10024'
],
},
vote: { // !estimatefee
address: 'electrum1.cipig.net',
port: 10021,
proto: 'tcp',
txfee: 10000,
abbr: 'VOTE',
serverList: [
'electrum1.cipig.net:10021',
'electrum2.cipig.net:10021'
],
},
jumblr: { // !estimatefee jumblr: { // !estimatefee
address: 'electrum1.cipig.net', address: 'electrum1.cipig.net',
port: 10004, port: 10004,

16
routes/shepherd/elections.js

@ -141,12 +141,16 @@ module.exports = (shepherd) => {
let _opreturnFound = false; let _opreturnFound = false;
let _region; let _region;
for (let i = 0; i < decodedTx.outputs.length; i++) { if (decodedTx &&
if (decodedTx.outputs[i].scriptPubKey.asm.indexOf('OP_RETURN') > -1) { decodedTx.outputs &&
_opreturnFound = true; decodedTx.outputs.length) {
_region = shepherd.hex2str(decodedTx.outputs[i].scriptPubKey.hex.substr(4, decodedTx.outputs[i].scriptPubKey.hex.length)); for (let i = 0; i < decodedTx.outputs.length; i++) {
shepherd.log(`found opreturn tag ${_region}`); if (decodedTx.outputs[i].scriptPubKey.asm.indexOf('OP_RETURN') > -1) {
break; _opreturnFound = true;
_region = shepherd.hex2str(decodedTx.outputs[i].scriptPubKey.hex.substr(4, decodedTx.outputs[i].scriptPubKey.hex.length));
shepherd.log(`found opreturn tag ${_region}`);
break;
}
} }
} }

6
routes/shepherd/electrum/network.js

@ -61,6 +61,9 @@ module.exports = (shepherd) => {
coin === 'MNZ' || coin === 'MNZ' ||
coin === 'BTCH' || coin === 'BTCH' ||
coin === 'KMD' || coin === 'KMD' ||
coin === 'BEER' ||
coin === 'PIZZA' ||
coin === 'VOTE' ||
coin === 'KOMODO' || coin === 'KOMODO' ||
coinUC === 'SUPERNET' || coinUC === 'SUPERNET' ||
coinUC === 'REVS' || coinUC === 'REVS' ||
@ -83,6 +86,9 @@ module.exports = (shepherd) => {
coinUC === 'WLC' || coinUC === 'WLC' ||
coinUC === 'MNZ' || coinUC === 'MNZ' ||
coinUC === 'BTCH' || coinUC === 'BTCH' ||
coinUC === 'BEER' ||
coinUC === 'PIZZA' ||
coinUC === 'VOTE' ||
coinUC === 'KMD' || coinUC === 'KMD' ||
coinUC === 'KOMODO') { coinUC === 'KOMODO') {
return shepherd.electrumJSNetworks.komodo; return shepherd.electrumJSNetworks.komodo;

Loading…
Cancel
Save