Merge pull request #30 from rstormsf/core

(Hotfix) pass netid to list of validators
This commit is contained in:
Victor Baranov 2018-01-22 15:50:01 +03:00 committed by GitHub
commit 691c0a60b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -23,6 +23,7 @@ export default class Metadata {
const {METADATA_ADDRESS, MOC} = networkAddresses(netId);
this.metadataInstance = new this.web3_10.eth.Contract(MetadataAbi, METADATA_ADDRESS);
this.MOC_ADDRESS = MOC;
this.netId = netId;
console.log('Metadata contract:', METADATA_ADDRESS)
}
async createMetadata({
@ -91,7 +92,7 @@ export default class Metadata {
let all = [];
return new Promise(async(resolve, reject) => {
const poaInstance = new PoaConsensus({web3: this.web3_10})
const poaInstance = new PoaConsensus({web3: this.web3_10, netId: this.netId})
const keys = await poaInstance.getValidators()
for (let key of keys) {
let data = await this.getValidatorData({miningKey: key})

View File

@ -16,7 +16,7 @@ module.exports = (netId) => {
switch (netId){
case '77':
return SOKOL_ADDRESSES
case '99':
case '99':
return CORE_ADDRESSES
default:
return CORE_ADDRESSES