Updated validatorReader

This commit is contained in:
AnilChinchawale 2019-01-15 08:34:49 +05:30
parent e62fd0abe4
commit c68a50489f
4 changed files with 20 additions and 5 deletions

View file

@ -1,3 +1,18 @@
// Copyright (c) 2018 XDCchain
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
package blocksigner
import (
@ -68,4 +83,4 @@ func randomHash() common.Hash {
b[i] = letterBytes[rand.Intn(len(letterBytes))]
}
return b
}
}

View file

@ -28,4 +28,4 @@ contract BlockSigner {
function getSigners(bytes32 _blockHash) public view returns(address[]) {
return blockSigners[_blockHash];
}
}
}

View file

@ -1,4 +1,4 @@
// Code generated - DO NOT EDIT.
// Code generated - DO NOT EDIT.
// This file is a generated binding and any manual changes will be lost.
package contract
@ -532,4 +532,4 @@ func (_SafeMath *SafeMathTransactorRaw) Transfer(opts *bind.TransactOpts) (*type
// Transact invokes the (paid) contract method with params as input values.
func (_SafeMath *SafeMathTransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) {
return _SafeMath.Contract.contract.Transact(opts, method, params...)
}
}

View file

@ -85,4 +85,4 @@ func GetVoterCap(state *state.StateDB, candidate, voter common.Address) *big.Int
retByte := crypto.Keccak256(voter.Hash().Bytes(), common.BigToHash(locCandidateVoters).Bytes())
ret := state.GetState(common.HexToAddress(common.MasternodeVotingSMC), common.BytesToHash(retByte))
return ret.Big()
}
}