DERO-HE STARGATE Testnet Release37
This commit is contained in:
parent
d2e9638394
commit
063b692a43
@ -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.97-1.DEROHE.STARGATE+26112021")
|
var Version = semver.MustParse("3.4.98-1.DEROHE.STARGATE+25112021")
|
||||||
|
@ -134,11 +134,11 @@ try_again:
|
|||||||
switch {
|
switch {
|
||||||
case len(request.Block_list) < 20: // 20 blocks raw
|
case len(request.Block_list) < 20: // 20 blocks raw
|
||||||
i++
|
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
|
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
|
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
|
i += 500
|
||||||
default:
|
default:
|
||||||
i = i * 2
|
i = i * 2
|
||||||
@ -212,7 +212,7 @@ try_again:
|
|||||||
var orequest ObjectList
|
var orequest ObjectList
|
||||||
var oresponse Objects
|
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])
|
orequest.Block_list = append(orequest.Block_list, response.Block_list[i])
|
||||||
fill_common(&orequest.Common)
|
fill_common(&orequest.Common)
|
||||||
if err := connection.Client.Call("Peer.GetObject", orequest, &oresponse); err != nil {
|
if err := connection.Client.Call("Peer.GetObject", orequest, &oresponse); err != nil {
|
||||||
|
8
vendor/github.com/deroproject/graviton/node_inner.go
generated
vendored
8
vendor/github.com/deroproject/graviton/node_inner.go
generated
vendored
@ -331,7 +331,7 @@ func (in *inner) MarshalTo(store *Store, buf []byte, bucket string) (int, error)
|
|||||||
done += tsize
|
done += tsize
|
||||||
tsize = binary.PutUvarint(buf[done:], uint64(len(bucket))) // bucket name length
|
tsize = binary.PutUvarint(buf[done:], uint64(len(bucket))) // bucket name length
|
||||||
done += tsize
|
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)
|
lhash, err := in.lhash(store)
|
||||||
errors = append(errors, err)
|
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) {
|
switch getNodeType(in.right) {
|
||||||
@ -357,7 +357,7 @@ func (in *inner) MarshalTo(store *Store, buf []byte, bucket string) (int, error)
|
|||||||
done += tsize
|
done += tsize
|
||||||
rhash, err := in.rhash(store)
|
rhash, err := in.rhash(store)
|
||||||
errors = append(errors, err)
|
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
|
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
|
done += tsize
|
||||||
|
|
||||||
if len(buf) < done+HASHSIZE {
|
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])
|
copy(left.hash[:], buf[done:done+HASHSIZE])
|
||||||
|
2
vendor/github.com/deroproject/graviton/tree.go
generated
vendored
2
vendor/github.com/deroproject/graviton/tree.go
generated
vendored
@ -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
|
var done int
|
||||||
if done, err = in.MarshalTo(t.store, buf[:], t.treename); err == nil {
|
if done, err = in.MarshalTo(t.store, buf[:], t.treename); err == nil {
|
||||||
|
|
||||||
|
@ -214,11 +214,15 @@ func (w *Wallet_Memory) TransferPayload0(transfers []rpc.Transfer, ringsize uint
|
|||||||
topoheight := int64(-1)
|
topoheight := int64(-1)
|
||||||
var block_hash crypto.Hash
|
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
|
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
|
topoheight = daemon_topoheight - 3
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
_, _, block_hash, self_e, _ := w.GetEncryptedBalanceAtTopoHeight(transfers[0].SCID, topoheight, w.GetAddress().String())
|
_, _, block_hash, self_e, _ := w.GetEncryptedBalanceAtTopoHeight(transfers[0].SCID, topoheight, w.GetAddress().String())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user