gini-core-0.1.0.0

Safe HaskellNone
LanguageHaskell2010

Gini.Core.Protocol.Work

Synopsis

Documentation

pooledProofOfWorkGeneration #

Arguments

:: (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