DERO-HE STARGATE Mainnet Release50
This commit is contained in:
parent
b9ab381897
commit
63f1884e1c
@ -1165,7 +1165,7 @@ func (chain *Blockchain) Add_TX_To_Pool(tx *transaction.Transaction) error {
|
||||
if tx.IsRegistration() { // registration tx will not go any forward
|
||||
|
||||
tx_hash := tx.GetHash()
|
||||
if chain.simulator == false && !(tx_hash[0] == 0 && tx_hash[1] == 0 && tx_hash[2] <= 0x3) {
|
||||
if chain.simulator == false && !(tx_hash[0] == 0 && tx_hash[1] == 0 && tx_hash[2] == 0) {
|
||||
return fmt.Errorf("TX doesn't solve Pow")
|
||||
}
|
||||
|
||||
|
@ -21,7 +21,7 @@ import "os"
|
||||
import "time"
|
||||
import "fmt"
|
||||
import "errors"
|
||||
|
||||
import "runtime"
|
||||
import "strings"
|
||||
|
||||
import "path/filepath"
|
||||
@ -134,15 +134,30 @@ func handle_easymenu_post_open_command(l *readline.Instance, line string) (proce
|
||||
fmt.Fprintf(l.Stderr(), "This will take a couple of minutes.Please wait....\n")
|
||||
|
||||
var reg_tx *transaction.Transaction
|
||||
for {
|
||||
|
||||
reg_tx = wallet.GetRegistrationTX()
|
||||
hash := reg_tx.GetHash()
|
||||
successful_regs := make(chan *transaction.Transaction)
|
||||
|
||||
if hash[0] == 0 && hash[1] == 0 && hash[2] <= 0x3 {
|
||||
counter := 0
|
||||
|
||||
for i := 0; i < runtime.GOMAXPROCS(0); i++ {
|
||||
go func() {
|
||||
|
||||
for counter == 0 {
|
||||
|
||||
lreg_tx := wallet.GetRegistrationTX()
|
||||
hash := lreg_tx.GetHash()
|
||||
|
||||
if hash[0] == 0 && hash[1] == 0 && hash[2] == 0 {
|
||||
successful_regs <- lreg_tx
|
||||
counter++
|
||||
break
|
||||
}
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
reg_tx = <-successful_regs
|
||||
|
||||
fmt.Fprintf(l.Stderr(), "Registration TXID %s\n", reg_tx.GetHash())
|
||||
err := wallet.SendTransaction(reg_tx)
|
||||
if err != nil {
|
||||
|
@ -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.138-49.DEROHE.STARGATE+10032022")
|
||||
var Version = semver.MustParse("3.4.141-50.DEROHE.STARGATE+18032022")
|
||||
|
@ -328,13 +328,13 @@ func get_peer_list_specific(addr string) (peers []Peer_Info) {
|
||||
plist := get_peer_list()
|
||||
sort.SliceStable(plist, func(i, j int) bool { return plist[i].Addr < plist[j].Addr })
|
||||
|
||||
if len(plist) <= 7 {
|
||||
if len(plist) <= 31 {
|
||||
peers = plist
|
||||
} else {
|
||||
index := sort.Search(len(plist), func(i int) bool { return plist[i].Addr < addr })
|
||||
for i := range plist {
|
||||
peers = append(peers, plist[(i+index)%len(plist)])
|
||||
if len(peers) >= 7 {
|
||||
if len(peers) >= 31 {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
@ -961,9 +961,13 @@ func (w *Wallet_Memory) synchistory_block(scid crypto.Hash, topo int64) (err err
|
||||
//fmt.Printf("decoding encrypted payload %x\n",tx.Payloads[t].RPCPayload)
|
||||
crypto.EncryptDecryptUserData(crypto.Keccak256(shared_key[:], w.GetAddress().PublicKey.EncodeCompressed()), tx.Payloads[t].RPCPayload)
|
||||
//fmt.Printf("decoded plaintext payload %x\n",tx.Payloads[t].RPCPayload)
|
||||
sender_idx := uint(tx.Payloads[t].RPCPayload[0])
|
||||
|
||||
if sender_idx <= uint(tx.Payloads[t].Statement.RingSize) {
|
||||
// if ring size is 2, the other party is the sender so mark it so
|
||||
if uint(tx.Payloads[t].Statement.RingSize) == 2 {
|
||||
sender_idx := 0
|
||||
if j == 0 {
|
||||
sender_idx = 1
|
||||
}
|
||||
addr := rpc.NewAddressFromKeys((*crypto.Point)(tx.Payloads[t].Statement.Publickeylist[sender_idx]))
|
||||
addr.Mainnet = w.GetNetwork()
|
||||
entry.Sender = addr.String()
|
||||
|
Loading…
Reference in New Issue
Block a user