Closed HarryL5004 closed 4 years ago
Where can I find the column labels for the producer table?
The columns for the producer table are: (public_key_hash TEXT PRIMARY KEY, timestamp INTEGER)
You can find the column labels in sqlstatements
where it says CREATE_PRODUCER_TABLE
.
Are the timestamps and interval both in nanoseconds? Because if so the interval is always to large for the condition pT < wT + itv
to ever be false
Sorry for the late response. I updated the unit test so that pT
is now possible to be greater than or equal to wT + itv
.
Package context:
internal/validation
Branch:validate_Block
For this issue, add code to the
ValidateProducerTimestamp
function stub that checks the timestamp (pT) in the parameter with the timestamp (wT) in theproducer
table corresponding to the wallet address and the interval (itv).Return false if the parameter timestamp is less than the sum of the table timestamp and the interval.
pT < wT + itv
Useful Resources:
constants.ProducerTable