Skip to content

Commit

Permalink
feat(dpos): generate block with sponsor tx
Browse files Browse the repository at this point in the history
  • Loading branch information
RainFallsSilent committed Jan 20, 2025
1 parent c834e8f commit ce40e86
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions pow/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,10 +345,6 @@ func (pow *Service) GenerateBlock(minerAddr string,
var proposalsUsedAmount common.Fixed64
for _, tx := range txs {

if tx.IsRecordSponorTx() {
continue
}

size := totalTxsSize + tx.GetSize()
if size > int(pact.MaxBlockContextSize) {
continue
Expand All @@ -359,6 +355,11 @@ func (pow *Service) GenerateBlock(minerAddr string,
break
}

if tx.IsRecordSponorTx() {
txCount++
continue
}

if !blockchain.IsFinalizedTransaction(tx, nextBlockHeight) {
continue
}
Expand Down

0 comments on commit ce40e86

Please sign in to comment.