DERO-HE STARGATE Testnet Release37

This commit is contained in:
Captain 2022-01-02 15:49:13 +00:00
parent d2e9638394
commit 063b692a43
No known key found for this signature in database
GPG Key ID: 18CDB3ED5E85D2D4
5 changed files with 16 additions and 12 deletions

View File

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

View File

@ -134,11 +134,11 @@ try_again:
switch {
case len(request.Block_list) < 20: // 20 blocks raw
i++
case len(request.Block_list) < 100: // 20 block with 5 steps
case len(request.Block_list) < 40: // 20 block with 5 steps
i += 5
case len(request.Block_list) < 1000: // 20 block with 50 steps
case len(request.Block_list) < 60: // 20 block with 50 steps
i += 50
case len(request.Block_list) < 10000: // 20 block with 500 steps
case len(request.Block_list) < 80: // 20 block with 500 steps
i += 500
default:
i = i * 2
@ -212,7 +212,7 @@ try_again:
var orequest ObjectList
var oresponse Objects
//fmt.Printf("inserting blocks %d %x\n", (int64(i) + response.Start_topoheight), response.Block_list[i][:])
fmt.Printf("inserting blocks %d %x\n", (int64(i) + response.Start_topoheight), response.Block_list[i][:])
orequest.Block_list = append(orequest.Block_list, response.Block_list[i])
fill_common(&orequest.Common)
if err := connection.Client.Call("Peer.GetObject", orequest, &oresponse); err != nil {

View File

@ -331,7 +331,7 @@ func (in *inner) MarshalTo(store *Store, buf []byte, bucket string) (int, error)
done += tsize
tsize = binary.PutUvarint(buf[done:], uint64(len(bucket))) // bucket name length
done += tsize
done += copy(buf[done:], []byte(bucket)) // write bucket name
done += copy(buf[done: done+len(bucket)], []byte(bucket)) // write bucket name, panic if buffer is small
}
@ -345,7 +345,7 @@ func (in *inner) MarshalTo(store *Store, buf []byte, bucket string) (int, error)
lhash, err := in.lhash(store)
errors = append(errors, err)
done += copy(buf[done:], lhash) // insert left hash
done += copy(buf[done: done+32], lhash) // insert left hash
}
switch getNodeType(in.right) {
@ -357,7 +357,7 @@ func (in *inner) MarshalTo(store *Store, buf []byte, bucket string) (int, error)
done += tsize
rhash, err := in.rhash(store)
errors = append(errors, err)
done += copy(buf[done:], rhash) // insert right hash
done += copy(buf[done:done+32], rhash) // insert right hash
}
buf[0] = byte(done) // prepend with length
@ -427,7 +427,7 @@ func parse_node(level byte, nodetype byte, buf []byte) (node, int, error) {
done += tsize
if len(buf) < done+HASHSIZE {
return nil, 0, xerrors.Errorf("Probably data corruption, input buffer has incomplete data")
return nil, 0, xerrors.Errorf("Probably data corruption, input buffer has incomplete data len(buf) %d done %d (%s)\n",len(buf),done, string(buf))
}
copy(left.hash[:], buf[done:done+HASHSIZE])

View File

@ -362,7 +362,7 @@ func (t *Tree) commit_inner(gv *Snapshot, specialversion bool, level int, in *in
}
var buf [128]byte
var buf [384]byte
var done int
if done, err = in.MarshalTo(t.store, buf[:], t.treename); err == nil {

View File

@ -214,11 +214,15 @@ func (w *Wallet_Memory) TransferPayload0(transfers []rpc.Transfer, ringsize uint
topoheight := int64(-1)
var block_hash crypto.Hash
{ // if wallet has been recently used, increase probability of user's tx being successfully mined
{ // if wallet has not been recently used, increase probability of user's tx being successfully mined
var zeroscid crypto.Hash
if w.getEncryptedBalanceresult(zeroscid).Topoheight+3 < daemon_topoheight {
if w.getEncryptedBalanceresult(zeroscid).Topoheight+2 <= daemon_topoheight {
topoheight = daemon_topoheight - 2
}
if w.getEncryptedBalanceresult(zeroscid).Topoheight+3 <= daemon_topoheight {
topoheight = daemon_topoheight - 3
}
}
_, _, block_hash, self_e, _ := w.GetEncryptedBalanceAtTopoHeight(transfers[0].SCID, topoheight, w.GetAddress().String())