Validate votebits in payfee (#37)
This commit is contained in:
parent
cf55092c21
commit
00525f4d53
@ -261,6 +261,11 @@ func payFee(c *gin.Context) {
|
||||
}
|
||||
|
||||
voteBits := payFeeRequest.VoteBits
|
||||
if !isValidVoteBits(cfg.NetParams, currentVoteVersion(cfg.NetParams), voteBits) {
|
||||
log.Warnf("Invalid votebits from %s", c.ClientIP())
|
||||
sendErrorResponse("invalid votebits", http.StatusBadRequest, c)
|
||||
return
|
||||
}
|
||||
|
||||
feeTxBytes, err := hex.DecodeString(payFeeRequest.FeeTx)
|
||||
if err != nil {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user