Skip to content

Commit

Permalink
Merge pull request #128 from SiaFoundation/pj/value-receiver
Browse files Browse the repository at this point in the history
HostSettings Value Receiver
  • Loading branch information
peterjan authored Oct 11, 2023
2 parents a072abe + 2d23146 commit b58e9e8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rhp/v2/rhp.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ func (c RPCCost) Total() (cost, collateral types.Currency) {
}

// RPCReadCost returns the cost of a Read RPC.
func (hs *HostSettings) RPCReadCost(sections []RPCReadRequestSection, proof bool) (RPCCost, error) {
func (hs HostSettings) RPCReadCost(sections []RPCReadRequestSection, proof bool) (RPCCost, error) {
// validate the request sections and calculate the cost
var bandwidth uint64
for _, sec := range sections {
Expand Down Expand Up @@ -355,7 +355,7 @@ func (hs *HostSettings) RPCReadCost(sections []RPCReadRequestSection, proof bool
}

// RPCSectorRootsCost returns the cost of a SectorRoots RPC.
func (hs *HostSettings) RPCSectorRootsCost(rootOffset, numRoots uint64) RPCCost {
func (hs HostSettings) RPCSectorRootsCost(rootOffset, numRoots uint64) RPCCost {
proofSize := RangeProofSize(LeavesPerSector, rootOffset, rootOffset+numRoots)
return RPCCost{
Base: hs.BaseRPCPrice,
Expand All @@ -364,7 +364,7 @@ func (hs *HostSettings) RPCSectorRootsCost(rootOffset, numRoots uint64) RPCCost
}

// RPCWriteCost returns the cost of a Write RPC.
func (hs *HostSettings) RPCWriteCost(actions []RPCWriteAction, oldSectors, remainingDuration uint64, proof bool) (RPCCost, error) {
func (hs HostSettings) RPCWriteCost(actions []RPCWriteAction, oldSectors, remainingDuration uint64, proof bool) (RPCCost, error) {
var uploadBytes uint64
newSectors := oldSectors
for _, action := range actions {
Expand Down

0 comments on commit b58e9e8

Please sign in to comment.