DERO-HE STARGATE Mainnet Release45

This commit is contained in:
Captain 2022-02-27 06:29:52 +00:00
parent 45bf8db024
commit 7f180ddbae
No known key found for this signature in database
GPG Key ID: 18CDB3ED5E85D2D4
4 changed files with 13 additions and 2 deletions

View File

@ -2,6 +2,7 @@ package astrobwt
import "fmt" import "fmt"
import "unsafe" import "unsafe"
import "crypto/rand"
import "encoding/binary" import "encoding/binary"
import "golang.org/x/crypto/sha3" import "golang.org/x/crypto/sha3"
import "golang.org/x/crypto/salsa20/salsa" import "golang.org/x/crypto/salsa20/salsa"
@ -13,6 +14,15 @@ var x = fmt.Sprintf
const stage1_length int = 9973 // it is a prime const stage1_length int = 9973 // it is a prime
func POW16(inputdata []byte) (outputhash [32]byte) { func POW16(inputdata []byte) (outputhash [32]byte) {
defer func() {
if r := recover(); r != nil { // if something happens due to RAM issues in miner, we should continue, system will crash sooner or later
var buf [16]byte
rand.Read(buf[:])
outputhash = sha3.Sum256(buf[:]) // return a falsified has which will fail the check
}
}()
var counter [16]byte var counter [16]byte
key := sha3.Sum256(inputdata) key := sha3.Sum256(inputdata)

View File

@ -119,6 +119,7 @@ func SendJob() {
if !v.valid_address && !chain.IsAddressHashValid(false, v.address_sum) { if !v.valid_address && !chain.IsAddressHashValid(false, v.address_sum) {
params.LastError = "unregistered miner or you need to wait 15 mins" params.LastError = "unregistered miner or you need to wait 15 mins"
} else { } else {
params.LastError = ""
v.valid_address = true v.valid_address = true
} }
params.Blockhashing_blob = fmt.Sprintf("%x", mbl.Serialize()) params.Blockhashing_blob = fmt.Sprintf("%x", mbl.Serialize())

View File

@ -4,7 +4,7 @@
<a href="https://github.com/deroproject/">DERO explorer source code</a> <a href="https://github.com/deroproject/">DERO explorer source code</a>
| explorer version (api): under development (1.0) | explorer version (api): under development (1.0)
| dero version: golang pre-alpha | dero version: golang pre-alpha
| Copyright 2017-2021 Dero Project | Copyright 2017-2022 Dero Project
</h6> </h6>
</div> </div>
</body> </body>

View File

@ -20,4 +20,4 @@ import "github.com/blang/semver/v4"
// right now it has to be manually changed // right now it has to be manually changed
// do we need to include git commitsha?? // do we need to include git commitsha??
var Version = semver.MustParse("3.4.118-0.DEROHE.STARGATE+26022022") var Version = semver.MustParse("3.4.120-0.DEROHE.STARGATE+26022022")