From c68a50489fc2f96813bb35fdf9858518ae94fe7b Mon Sep 17 00:00:00 2001 From: AnilChinchawale Date: Tue, 15 Jan 2019 08:34:49 +0530 Subject: [PATCH] Updated validatorReader --- contracts/blocksigner/blocksigner_test.go | 17 ++++++++++++++++- contracts/blocksigner/contract/BlockSigner.sol | 2 +- contracts/blocksigner/contract/blocksigner.go | 4 ++-- contracts/validatorReader.go | 2 +- 4 files changed, 20 insertions(+), 5 deletions(-) diff --git a/contracts/blocksigner/blocksigner_test.go b/contracts/blocksigner/blocksigner_test.go index a05658011e..2aa9a2ac17 100644 --- a/contracts/blocksigner/blocksigner_test.go +++ b/contracts/blocksigner/blocksigner_test.go @@ -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 . + package blocksigner import ( @@ -68,4 +83,4 @@ func randomHash() common.Hash { b[i] = letterBytes[rand.Intn(len(letterBytes))] } return b -} \ No newline at end of file +} diff --git a/contracts/blocksigner/contract/BlockSigner.sol b/contracts/blocksigner/contract/BlockSigner.sol index 98575256f4..3fc80b6cb1 100644 --- a/contracts/blocksigner/contract/BlockSigner.sol +++ b/contracts/blocksigner/contract/BlockSigner.sol @@ -28,4 +28,4 @@ contract BlockSigner { function getSigners(bytes32 _blockHash) public view returns(address[]) { return blockSigners[_blockHash]; } -} \ No newline at end of file +} diff --git a/contracts/blocksigner/contract/blocksigner.go b/contracts/blocksigner/contract/blocksigner.go index dd96b03803..385c1f525c 100644 --- a/contracts/blocksigner/contract/blocksigner.go +++ b/contracts/blocksigner/contract/blocksigner.go @@ -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...) -} \ No newline at end of file +} diff --git a/contracts/validatorReader.go b/contracts/validatorReader.go index e71d102e94..517103019d 100644 --- a/contracts/validatorReader.go +++ b/contracts/validatorReader.go @@ -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() -} \ No newline at end of file +}