mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-06 11:02:18 +00:00
broadcast loop
This commit is contained in:
parent
d7a911dd0f
commit
1e8a19ac37
@ -113,6 +113,15 @@ func poolsFromFuzzBytes(rawTxNonce, rawValues, rawSender, rawSenderNonce, rawSen
|
|||||||
if len(rawSender)/20 != len(rawSenderBalance)/32 {
|
if len(rawSender)/20 != len(rawSenderBalance)/32 {
|
||||||
return nil, nil, txs, false
|
return nil, nil, txs, false
|
||||||
}
|
}
|
||||||
|
senderNonce, ok := u64Slice(rawSenderNonce)
|
||||||
|
if !ok {
|
||||||
|
return nil, nil, txs, false
|
||||||
|
}
|
||||||
|
for i := 0; i < len(senderNonce); i++ {
|
||||||
|
if senderNonce[i] == 0 {
|
||||||
|
return nil, nil, txs, false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
txNonce, ok := u64Slice(rawTxNonce)
|
txNonce, ok := u64Slice(rawTxNonce)
|
||||||
if !ok {
|
if !ok {
|
||||||
@ -122,10 +131,6 @@ func poolsFromFuzzBytes(rawTxNonce, rawValues, rawSender, rawSenderNonce, rawSen
|
|||||||
if !ok {
|
if !ok {
|
||||||
return nil, nil, txs, false
|
return nil, nil, txs, false
|
||||||
}
|
}
|
||||||
senderNonce, ok := u64Slice(rawSenderNonce)
|
|
||||||
if !ok {
|
|
||||||
return nil, nil, txs, false
|
|
||||||
}
|
|
||||||
senderBalance, ok := u256Slice(rawSenderBalance)
|
senderBalance, ok := u256Slice(rawSenderBalance)
|
||||||
if !ok {
|
if !ok {
|
||||||
return nil, nil, txs, false
|
return nil, nil, txs, false
|
||||||
@ -133,9 +138,9 @@ func poolsFromFuzzBytes(rawTxNonce, rawValues, rawSender, rawSenderNonce, rawSen
|
|||||||
|
|
||||||
sendersInfo = map[uint64]*senderInfo{}
|
sendersInfo = map[uint64]*senderInfo{}
|
||||||
senderIDs = map[string]uint64{}
|
senderIDs = map[string]uint64{}
|
||||||
for i := 0; i < len(rawSender); i += 20 {
|
for i := 0; i < len(senderNonce); i++ {
|
||||||
sendersInfo[uint64(i)] = newSenderInfo(senderNonce[i], senderBalance[i])
|
sendersInfo[uint64(i)] = newSenderInfo(senderNonce[i], senderBalance[i])
|
||||||
senderIDs[string(rawSender[i:i+20])] = uint64(i)
|
senderIDs[string(rawSender[i*20:(i+1)*20])] = uint64(i)
|
||||||
}
|
}
|
||||||
for i := range txNonce {
|
for i := range txNonce {
|
||||||
txs.txs = append(txs.txs, &TxSlot{
|
txs.txs = append(txs.txs, &TxSlot{
|
||||||
|
Loading…
Reference in New Issue
Block a user