Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- pooledProofOfWorkGeneration :: (MonadIO m, MonadUnliftIO m) => Word64 -> Either Account BlockHash -> m ProofOfWork
- verifyProofOfWork :: SignedBlock -> Bool
Documentation
:: (MonadIO m, MonadUnliftIO m) | |
=> Word64 | Random nonce |
-> Either Account BlockHash | |
-> m ProofOfWork |
pooledProofOfWorkGeneration
is used to find a valid
ProofOfWork
for an UnsignedBlock
. This function will spawn a
pool of threads and each of them will have an different incremented
nonce based on the nonce value. The random nonce value will be
incremented and tried on untill we compute a valid ProofOfWork
.
verifyProofOfWork :: SignedBlock -> Bool #
Verifies Proof of work in the SignedBlock