import (
"math/big"
+ "time"
"github.com/bytom/bytom/consensus"
- "github.com/bytom/bytom/mining/tensority"
"github.com/bytom/bytom/protocol/bc"
"github.com/bytom/bytom/protocol/bc/types"
)
// CheckProofOfWork checks whether the hash is valid for a given difficulty.
func CheckProofOfWork(hash, seed *bc.Hash, bits uint64) bool {
- compareHash := tensority.AIHash.Hash(hash, seed)
- return HashToBig(compareHash).Cmp(CompactToBig(bits)) <= 0
+ //compareHash := tensority.AIHash.Hash(hash, seed)
+ time.Sleep(30 * time.Second)
+ return true
}
// CalcNextRequiredDifficulty return the difficulty using compact representation
// config for pow mining
BlocksPerRetarget = uint64(2016)
- TargetSecondsPerBlock = uint64(150)
+ TargetSecondsPerBlock = uint64(30)
SeedPerRetarget = uint64(256)
// MaxTimeOffsetSeconds is the maximum number of seconds a block time is allowed to be ahead of the current time