-
Notifications
You must be signed in to change notification settings - Fork 337
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: add stamper putter to api #930
Conversation
cc91f65
to
b2bb406
Compare
6430ae6
to
b599c00
Compare
134fa9a
to
cbd4d4a
Compare
c070f13
to
5ece9af
Compare
cbd4d4a
to
97b2a15
Compare
5ece9af
to
948c43b
Compare
mode, encrypt := requestModePut(r), requestEncrypt(r) | ||
return func(ctx context.Context, r io.Reader, l int64) (swarm.Address, error) { | ||
pipe := builder.NewPipelineBuilder(ctx, s, mode, encrypt, nil) | ||
return builder.FeedPipeline(ctx, pipe, r, l) | ||
} | ||
} | ||
|
||
func requestStamper(post postage.Service, signer crypto.Signer, batch []byte) (postage.Stamper, error) { | ||
i, err := post.GetStampIssuer(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.
post.GetStamper(batch,signer)
534e14f
to
5727b4d
Compare
pkg/file/pipeline/stamp/stamp.go
Outdated
|
||
func (w *stampWriter) ChainWrite(p *pipeline.PipeWriteArgs) (err error) { | ||
addr := swarm.NewAddress(p.Ref) | ||
p.Stamp, err = w.stamper.Stamp(addr) |
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.
this sets the stamp on the pipe write args, but does not implement the change which adds the stamp to the actual chunk which is in turn stored on the localstore. i suggest that this change is done in one PR (change to the chunk interface + persistence in localstore)
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.
i wish we kept the unrelated fixes in separate PRs in future
@zelig but the CI is failing. I don't know any way around that, particularly that deepsource scans different parts of the codebase randomly on different PRs 🤷♂️ |
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.
Looks good to me.
#873
changes that were made outside the scope of this PR are due to complaints from deepsource.