Skip to content

Commit

Permalink
main: only update utreexo data stats for sending if it's not nil
Browse files Browse the repository at this point in the history
  • Loading branch information
kcalvinalvin committed Nov 10, 2023
1 parent 5604fb9 commit d6edbc6
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2602,8 +2602,10 @@ func (s *server) UpdateProofBytesWritten(msgTx *wire.MsgTx) error {
s.addAccBytesSent(uint64(accSize))

} else if s.chain.IsUtreexoViewActive() {
s.addProofBytesSent(uint64(msgTx.UData.SerializeSizeCompact(true)))
s.addAccBytesSent(uint64(msgTx.UData.SerializeAccSizeCompact()))
if msgTx.UData != nil {
s.addProofBytesSent(uint64(msgTx.UData.SerializeSizeCompact(true)))
s.addAccBytesSent(uint64(msgTx.UData.SerializeAccSizeCompact()))
}
}

return nil
Expand Down

0 comments on commit d6edbc6

Please sign in to comment.