-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
storage incentives: batch service and backing store #1069
Conversation
} | ||
svc := newTestBatchService(t, store) | ||
|
||
if err := svc.TopUp(testID, testAmount); err != nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
confusing to use amount here when it is value we update
|
||
const ( | ||
batchKeyPrefix = "batchKeyPrefix" | ||
// valueKeyPrefix = "valueKeyPrefix" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need this index by value and replace/reinsert for topup and depth change
@@ -0,0 +1,34 @@ | |||
package mock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need all these mocks?
// Batch represents a postage batch, a payment on the blockchain. | ||
type Batch struct { | ||
ID []byte // batch ID | ||
Value *big.Int // overall balance of the batch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
incorrect or misleading comment
// EventUpdater interface definitions reflect the updates triggered by events | ||
// emitted by the postage contract on the blockchain | ||
type EventUpdater interface { | ||
Create(id []byte, owner []byte, amount *big.Int, depth uint8) error |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use value
instead of amount
closed in favor of #1070 |
#1046 #922 and parts of #934