TeamEmpireCoin / EmpireCoin

EmpireCoin is an experimental cryptocurrency where players vote on outcomes to win coins
http://empirecoin.org
MIT License
2 stars 2 forks source link

Bug in either round explorer or EmpireCoin core code #12

Closed xmadisco closed 8 years ago

xmadisco commented 8 years ago

In reference to this link: http://212.71.249.117/explorer/rounds/17

I see a different history according to my logs.

-------------------------------------------------------------
20152015-12-05 22:20:39 getWinningAddresses called on height 170
2015-12-05 22:20:39 getWinningAddresses is considering blocks from 161 to 169
2015-12-05 22:20:39 Reading block stored at height 161
2015-12-05 22:20:39 getWinningAddress: considering block 161 (from 170) back with hash 00000b1d61e9e65aaf7924641fa1120e99bce61faf9b821ba0230fef5c7a795f (containing 1 transactions)
2015-12-05 22:20:39 Reading block stored at height 162
2015-12-05 22:20:39 getWinningAddress: considering block 162 (from 170) back with hash 000000492ac3fbaa767fb608a953499193a4abfe3b533b5414d886397cfbacbd (containing 1 transactions)
2015-12-05 22:20:39 Reading block stored at height 163
2015-12-05 22:20:39 getWinningAddress: considering block 163 (from 170) back with hash 00000f5c44303813659b28222d28628eb6f29c0a4680ca6906683808ec7551ec (containing 4 transactions)
2015-12-05 22:20:39 Should be adding vote of 1900000000 for Nation 9, addr eEAtLvmv2tWaQuVFftQuWwKV7tU6hiNDfh
2015-12-05 22:20:39 Got vote address[0] = eEAtLvmv2tWaQuVFftQuWwKV7tU6hiNDfh (NATION=9, voteSum[9] =1900000000, total=1900000000)
2015-12-05 22:20:39 Added first vote winner for nation 9
2015-12-05 22:20:39 Should be adding vote of 1400000000 for Nation 14, addr eEfNSP4XCU7c8VCjBww3h2J6ZSiDqe4Ncz
2015-12-05 22:20:39 Got vote address[0] = eEfNSP4XCU7c8VCjBww3h2J6ZSiDqe4Ncz (NATION=14, voteSum[14] =1400000000, total=3300000000)
2015-12-05 22:20:39 Added first vote winner for nation 14
2015-12-05 22:20:39 Should be adding vote of 1300000000 for Nation 2, addr eE3qe7NZMvgxYnhPARZupJKXvwY5nUfS32
2015-12-05 22:20:39 Got vote address[0] = eE3qe7NZMvgxYnhPARZupJKXvwY5nUfS32 (NATION=2, voteSum[2] =1300000000, total=4600000000)
2015-12-05 22:20:39 Added first vote winner for nation 2
2015-12-05 22:20:39 Reading block stored at height 164
2015-12-05 22:20:39 getWinningAddress: considering block 164 (from 170) back with hash 000000d51ee84ffa8533492a0308f4c4212767ea66216ac34f799c1faf123e61 (containing 1 transactions)
2015-12-05 22:20:39 Reading block stored at height 165
2015-12-05 22:20:39 getWinningAddress: considering block 165 (from 170) back with hash 000002e5a8c746b903b5756be6056d65bf14477c721c2d6bec5ebfb72c828ded (containing 1 transactions)
2015-12-05 22:20:39 Reading block stored at height 166
2015-12-05 22:20:39 getWinningAddress: considering block 166 (from 170) back with hash 00000e8a97e93ab45fb9ca9844fb134082397da1efcf5139117e59c7071b5799 (containing 1 transactions)
2015-12-05 22:20:39 Reading block stored at height 167
2015-12-05 22:20:39 getWinningAddress: considering block 167 (from 170) back with hash 00000133d91fe47a234fcb89475ee3829802721689dbc17148c841e3e5e59beb (containing 1 transactions)
2015-12-05 22:20:39 Reading block stored at height 168
2015-12-05 22:20:39 getWinningAddress: considering block 168 (from 170) back with hash 0000019fc76acc6679fd73964a7c52fc624c6a12e814be4783b2ca5a2e13c094 (containing 1 transactions)
2015-12-05 22:20:39 Reading block stored at height 169
2015-12-05 22:20:39 getWinningAddress: considering block 169 (from 170) back with hash 000009b7953e5b56250839481520e335396e4404ce6c0cdffe4e48b93a04e4e1 (containing 1 transactions)
2015-12-05 22:20:39 Got maxVoteSum of 1150000000
2015-12-05 22:20:39 Nation 0 Score = 0, voteSum = 0
2015-12-05 22:20:39 Nation 1 Score = 0, voteSum = 0
2015-12-05 22:20:39 Eliminating nation 2 because 1300000000 > 1150000000 (max)
2015-12-05 22:20:39 Nation 2 Score = 0, voteSum = 1300000000
2015-12-05 22:20:39 Nation 3 Score = 0, voteSum = 0
2015-12-05 22:20:39 Nation 4 Score = 0, voteSum = 0
2015-12-05 22:20:39 Nation 5 Score = 0, voteSum = 0
2015-12-05 22:20:39 Nation 6 Score = 0, voteSum = 0
2015-12-05 22:20:39 Nation 7 Score = 0, voteSum = 0
2015-12-05 22:20:39 Nation 8 Score = 0, voteSum = 0
2015-12-05 22:20:39 Eliminating nation 9 because 1900000000 > 1150000000 (max)
2015-12-05 22:20:39 Nation 9 Score = 0, voteSum = 1900000000
2015-12-05 22:20:39 Nation 10 Score = 0, voteSum = 0
2015-12-05 22:20:39 Nation 11 Score = 0, voteSum = 0
2015-12-05 22:20:39 Nation 12 Score = 0, voteSum = 0
2015-12-05 22:20:39 Nation 13 Score = 0, voteSum = 0
2015-12-05 22:20:39 Eliminating nation 14 because 1400000000 > 1150000000 (max)
2015-12-05 22:20:39 Nation 14 Score = 0, voteSum = 1400000000
2015-12-05 22:20:39 Nation 15 Score = 0, voteSum = 0
2015-12-05 22:20:39 Got High of 0 (0), Low of 10000000000 (0), Tie is 0 (0)
2015-12-05 22:20:39 Found no winners this voting period
-------------------------------------------------------------

Not sure where the error is.

joeyfrich commented 8 years ago

Whoops, after recompiling a few days ago I didn't have txindex=1 in my EmpireCoin.conf so the block explorer was missing a lot of transactions. This is now fixed.