mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
Updated validatorReader
This commit is contained in:
parent
e62fd0abe4
commit
c68a50489f
4 changed files with 20 additions and 5 deletions
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -28,4 +28,4 @@ contract BlockSigner {
|
|||
function getSigners(bytes32 _blockHash) public view returns(address[]) {
|
||||
return blockSigners[_blockHash];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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...)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue