RE: RE: Why was LeoFinance Down For So Long? + miner attack vector
You are viewing a single comment's thread from:

RE: Why was LeoFinance Down For So Long? + miner attack vector

Words
24
Reading
1 min
Listen
Play
6y

The random number generation for hive-engine is defined here:
https://github.com/hive-engine/steemsmartcontracts/blob/hive-engine/libs/SmartContracts.js#L134

const rng = seedrandom(`${prevRefHiveBlockId}${refHiveBlockId}${transactionId}`);

the random number function is using rng:
https://github.com/hive-engine/steemsmartcontracts/blob/hive-engine/libs/SmartContracts.js#L180

The mining source code can be found here:
https://github.com/hive-engine/steemsmartcontracts/blob/hive-engine/contracts/mining.js

@holger80: The random number | Ecency