Skip to content
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

Bump go.sia.tech/core from 0.6.2 to 0.6.3 in the all-dependencies group #145

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions api/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func TestAPI(t *testing.T) {
testutil.Equal(t, "previous timestamps", cs.PrevTimestamps, resp.PrevTimestamps)
testutil.Equal(t, "depth", cs.Depth, resp.Depth)
testutil.Equal(t, "child target", cs.ChildTarget, resp.ChildTarget)
testutil.Equal(t, "siafund pool", cs.SiafundPool, resp.SiafundPool)
testutil.Equal(t, "siafund tax revenue", cs.SiafundTaxRevenue, resp.SiafundTaxRevenue)
}},
{"Tip", func(t *testing.T) {
resp, err := client.Tip()
Expand All @@ -292,7 +292,7 @@ func TestAPI(t *testing.T) {
cs := cm.TipState()
testutil.Equal(t, "index", cs.Index, resp.Index)
testutil.Equal(t, "difficulty", cs.Difficulty, resp.Difficulty)
testutil.Equal(t, "siafund pool", cs.SiafundPool, resp.SiafundPool)
testutil.Equal(t, "siafund tax revenue", cs.SiafundTaxRevenue, resp.SiafundTaxRevenue)
testutil.Equal(t, "total hosts", 1, resp.TotalHosts)
testutil.Equal(t, "active contracts", 1, resp.ActiveContracts)
testutil.Equal(t, "failed contracts", 0, resp.FailedContracts)
Expand All @@ -313,7 +313,7 @@ func TestAPI(t *testing.T) {
cs := cm.TipState()
testutil.Equal(t, "index", tip, resp.Index)
testutil.Equal(t, "difficulty", cs.Difficulty, resp.Difficulty)
testutil.Equal(t, "siafund pool", cs.SiafundPool, resp.SiafundPool)
testutil.Equal(t, "siafund tax revenue", cs.SiafundTaxRevenue, resp.SiafundTaxRevenue)
testutil.Equal(t, "total hosts", 0, resp.TotalHosts)
testutil.Equal(t, "active contracts", 1, resp.ActiveContracts)
testutil.Equal(t, "failed contracts", 0, resp.FailedContracts)
Expand Down
9 changes: 2 additions & 7 deletions api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type (
Addr() string
Peers() []*syncer.Peer
Connect(ctx context.Context, addr string) (*syncer.Peer, error)
BroadcastHeader(bh gateway.BlockHeader)
BroadcastHeader(bh types.BlockHeader)
BroadcastTransactionSet(txns []types.Transaction)
BroadcastV2TransactionSet(index types.ChainIndex, txns []types.V2Transaction)
BroadcastV2BlockOutline(bo gateway.V2BlockOutline)
Expand Down Expand Up @@ -146,12 +146,7 @@ func (s *server) syncerBroadcastBlockHandler(jc jape.Context) {
return
}
if b.V2 == nil {
s.s.BroadcastHeader(gateway.BlockHeader{
ParentID: b.ParentID,
Nonce: b.Nonce,
Timestamp: b.Timestamp,
MerkleRoot: b.MerkleRoot(),
})
s.s.BroadcastHeader(b.Header())
} else {
s.s.BroadcastV2BlockOutline(gateway.OutlineBlock(b, s.cm.PoolTransactions(), s.cm.V2PoolTransactions()))
}
Expand Down
2 changes: 1 addition & 1 deletion explorer/events.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func AppliedEvents(cs consensus.State, b types.Block, cu ChainUpdate) []Event {
if ok {
addEvent(types.Hash256(outputID), cs.MaturityHeight(), &EventFoundationSubsidy{
SiacoinOutput: sce,
}, []types.Address{cs.FoundationPrimaryAddress})
}, []types.Address{cs.FoundationSubsidyAddress})
}

return events
Expand Down
11 changes: 6 additions & 5 deletions explorer/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,11 @@ type V2HostAnnouncement struct {

// A V2FileContractRenewal renews a file contract.
type V2FileContractRenewal struct {
FinalRevision V2FileContract `json:"finalRevision"`
NewContract V2FileContract `json:"newContract"`
RenterRollover types.Currency `json:"renterRollover"`
HostRollover types.Currency `json:"hostRollover"`
FinalRenterOutput types.SiacoinOutput `json:"finalRenterOutput"`
FinalHostOutput types.SiacoinOutput `json:"finalHostOutput"`
RenterRollover types.Currency `json:"renterRollover"`
HostRollover types.Currency `json:"hostRollover"`
NewContract V2FileContract `json:"newContract"`

// signatures cover above fields
RenterSignature types.Signature `json:"renterSignature"`
Expand Down Expand Up @@ -283,7 +284,7 @@ type Metrics struct {
// Current difficulty
Difficulty consensus.Work `json:"difficulty"`
// Siafund pool value
SiafundPool types.Currency `json:"siafundPool"`
SiafundTaxRevenue types.Currency `json:"siafundTaxRevenue"`
// Total announced hosts
TotalHosts uint64 `json:"totalHosts"`
// Number of leaves in the accumulator
Expand Down
2 changes: 1 addition & 1 deletion explorer/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ func applyChainUpdate(tx UpdateTx, cau chain.ApplyUpdate) error {
}
state.Metrics.Index = cau.State.Index
state.Metrics.Difficulty = cau.State.Difficulty
state.Metrics.SiafundPool = cau.State.SiafundPool
state.Metrics.SiafundTaxRevenue = cau.State.SiafundTaxRevenue
state.Metrics.NumLeaves = cau.State.Elements.NumLeaves

return tx.ApplyIndex(state)
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ toolchain go1.23.2
require (
github.com/ip2location/ip2location-go v8.3.0+incompatible
github.com/mattn/go-sqlite3 v1.14.24
go.sia.tech/core v0.6.2
go.sia.tech/coreutils v0.7.0
go.sia.tech/core v0.7.1-0.20241203043244-c435a355b1da
go.sia.tech/coreutils v0.7.1-0.20241203170156-ac0cf880fa70
go.sia.tech/jape v0.12.1
go.uber.org/zap v1.27.0
gopkg.in/yaml.v3 v3.0.1
Expand Down
8 changes: 6 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ github.com/stretchr/testify v1.8.3 h1:RP3t2pwF7cMEbC1dqtB6poj3niw/9gnV4Cjg5oW5gt
github.com/stretchr/testify v1.8.3/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
go.etcd.io/bbolt v1.3.11 h1:yGEzV1wPz2yVCLsD8ZAiGHhHVlczyC9d1rP43/VCRJ0=
go.etcd.io/bbolt v1.3.11/go.mod h1:dksAq7YMXoljX0xu6VF5DMZGbhYYoLUalEiSySYAS4I=
go.sia.tech/core v0.6.2 h1:8NEjxyD93A+EhZopsBy/LvuHH+zUSjRNKnf9rXgtIwU=
go.sia.tech/core v0.6.2/go.mod h1:4v+aT/33857tMfqa5j5OYlAoLsoIrd4d7qMlgeP+VGk=
go.sia.tech/core v0.6.3 h1:7VdCSF61td1iatjGc5xt8WwCZgyB91mTvKhuL35o234=
go.sia.tech/core v0.6.3/go.mod h1:4v+aT/33857tMfqa5j5OYlAoLsoIrd4d7qMlgeP+VGk=
go.sia.tech/core v0.7.1-0.20241203043244-c435a355b1da h1:taO86czGly5SIb8UswVI2W7rmxhmv9G4C93zoAwtfxk=
go.sia.tech/core v0.7.1-0.20241203043244-c435a355b1da/go.mod h1:4v+aT/33857tMfqa5j5OYlAoLsoIrd4d7qMlgeP+VGk=
go.sia.tech/coreutils v0.7.0 h1:YpgOUD4vrpDz0KC7FJz+UCOaKaqV5EkX3gMUUmJoz5s=
go.sia.tech/coreutils v0.7.0/go.mod h1:eMoqzqO4opKQ6n9tTTxHQmccfNlj+8RFOYuDSL/Qd4g=
go.sia.tech/coreutils v0.7.1-0.20241203170156-ac0cf880fa70 h1:ksY8McNsjadZvAzEISY+sfsJmOVRhLGr1oN64dpZtFY=
go.sia.tech/coreutils v0.7.1-0.20241203170156-ac0cf880fa70/go.mod h1:d6jrawloc02MCXi/EVc8FIN5h3C6XDiMs4fuFMcU0PU=
go.sia.tech/jape v0.12.1 h1:xr+o9V8FO8ScRqbSaqYf9bjj1UJ2eipZuNcI1nYousU=
go.sia.tech/jape v0.12.1/go.mod h1:wU+h6Wh5olDjkPXjF0tbZ1GDgoZ6VTi4naFw91yyWC4=
go.sia.tech/mux v1.3.0 h1:hgR34IEkqvfBKUJkAzGi31OADeW2y7D6Bmy/Jcbop9c=
Expand Down
9 changes: 3 additions & 6 deletions internal/testutil/chain.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,14 +173,11 @@ func SignV2TransactionWithContracts(cs consensus.State, pk, renterPK, hostPK typ
txn.FileContractRevisions[i].Revision.HostSignature = hostPK.SignHash(cs.ContractSigHash(txn.FileContractRevisions[i].Revision))
}
for i := range txn.FileContractResolutions {
switch r := txn.FileContractResolutions[i].Resolution.(type) {
case *types.V2FileContractRenewal:
if r, ok := txn.FileContractResolutions[i].Resolution.(*types.V2FileContractRenewal); ok {
r.RenterSignature = renterPK.SignHash(cs.RenewalSigHash(*r))
r.HostSignature = hostPK.SignHash(cs.RenewalSigHash(*r))
case *types.V2FileContractFinalization:
finalRevision := txn.FileContractResolutions[i].Parent.V2FileContract
finalRevision.RevisionNumber = types.MaxRevisionNumber
*r = types.V2FileContractFinalization(renterPK.SignHash(cs.ContractSigHash(finalRevision)))
r.NewContract.RenterSignature = renterPK.SignHash(cs.ContractSigHash(r.NewContract))
r.NewContract.HostSignature = hostPK.SignHash(cs.ContractSigHash(r.NewContract))
}
}
}
Expand Down
18 changes: 10 additions & 8 deletions internal/testutil/check.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,9 @@ func CheckV2Transaction(t *testing.T, expectTxn types.V2Transaction, gotTxn expl
Equal(t, "maturity height", expected.Parent.MaturityHeight, got.Parent.MaturityHeight)
Equal(t, "id", expected.Parent.ID, got.Parent.ID)
Equal(t, "leaf index", expected.Parent.StateElement.LeafIndex, got.Parent.StateElement.LeafIndex)
if len(got.SatisfiedPolicy.Preimages) == 0 {
got.SatisfiedPolicy.Preimages = nil
}
Equal(t, "satisfied policy", expected.SatisfiedPolicy, got.SatisfiedPolicy)
}

Expand All @@ -165,6 +168,9 @@ func CheckV2Transaction(t *testing.T, expectTxn types.V2Transaction, gotTxn expl
Equal(t, "claim address", expected.ClaimAddress, got.ClaimAddress)
Equal(t, "id", expected.Parent.ID, got.Parent.ID)
Equal(t, "leaf index", expected.Parent.StateElement.LeafIndex, got.Parent.StateElement.LeafIndex)
if len(got.SatisfiedPolicy.Preimages) == 0 {
got.SatisfiedPolicy.Preimages = nil
}
Equal(t, "satisfied policy", expected.SatisfiedPolicy, got.SatisfiedPolicy)
}

Expand Down Expand Up @@ -209,10 +215,13 @@ func CheckV2Transaction(t *testing.T, expectTxn types.V2Transaction, gotTxn expl
if gotV, ok := got.Resolution.(*explorer.V2FileContractRenewal); !ok {
t.Fatalf("expected V2FileContractRenewal, got %v", reflect.TypeOf(got.Resolution))
} else {
CheckV2FC(t, v.FinalRevision, gotV.FinalRevision)
CheckV2FC(t, v.NewContract, gotV.NewContract)

Equal(t, "type", "renewal", got.Type)
Equal(t, "final renter output address", v.FinalRenterOutput.Address, gotV.FinalRenterOutput.Address)
Equal(t, "final renter output value", v.FinalRenterOutput.Value, gotV.FinalRenterOutput.Value)
Equal(t, "final host output address", v.FinalHostOutput.Address, gotV.FinalHostOutput.Address)
Equal(t, "final host output value", v.FinalHostOutput.Value, gotV.FinalHostOutput.Value)
Equal(t, "renter rollover", v.RenterRollover, gotV.RenterRollover)
Equal(t, "host rollover", v.HostRollover, gotV.HostRollover)
Equal(t, "renter signature", v.RenterSignature, gotV.RenterSignature)
Expand All @@ -227,13 +236,6 @@ func CheckV2Transaction(t *testing.T, expectTxn types.V2Transaction, gotTxn expl
Equal(t, "leaf", v.Leaf, gotV.Leaf)
Equal(t, "proof", v.Proof, gotV.Proof)
}
case *types.V2FileContractFinalization:
if gotV, ok := got.Resolution.(*types.V2FileContractFinalization); !ok {
t.Fatalf("expected V2FileContractFinalization, got %v", reflect.TypeOf(got.Resolution))
} else {
Equal(t, "type", "finalization", got.Type)
Equal(t, "finalization signature", types.Signature(*v), types.Signature(*gotV))
}
case *types.V2FileContractExpiration:
Equal(t, "type", "expiration", got.Type)
if _, ok := got.Resolution.(*types.V2FileContractExpiration); !ok {
Expand Down
4 changes: 2 additions & 2 deletions persist/sqlite/addresses.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (st *Store) Hosts(pks []types.PublicKey) (result []explorer.Host, err error
encoded = append(encoded, encode(pk))
}

rows, err := tx.Query(`SELECT public_key,net_address,country_code,known_since,last_scan,last_scan_successful,last_announcement,total_scans,successful_interactions,failed_interactions,settings_accepting_contracts,settings_max_download_batch_size,settings_max_duration,settings_max_revise_batch_size,settings_net_address,settings_remaining_storage,settings_sector_size,settings_total_storage,settings_address,settings_window_size,settings_collateral,settings_max_collateral,settings_base_rpc_price,settings_contract_price,settings_download_bandwidth_price,settings_sector_access_price,settings_storage_price,settings_upload_bandwidth_price,settings_ephemeral_account_expiry,settings_max_ephemeral_account_balance,settings_revision_number,settings_version,settings_release,settings_sia_mux_port,price_table_uid,price_table_validity,price_table_host_block_height,price_table_update_price_table_cost,price_table_account_balance_cost,price_table_fund_account_cost,price_table_latest_revision_cost,price_table_subscription_memory_cost,price_table_subscription_notification_cost,price_table_init_base_cost,price_table_memory_time_cost,price_table_download_bandwidth_cost,price_table_upload_bandwidth_cost,price_table_drop_sectors_base_cost,price_table_drop_sectors_unit_cost,price_table_has_sector_base_cost,price_table_read_base_cost,price_table_read_length_cost,price_table_renew_contract_cost,price_table_revision_base_cost,price_table_swap_sector_base_cost,price_table_write_base_cost,price_table_write_length_cost,price_table_write_store_cost,price_table_txn_fee_min_recommended,price_table_txn_fee_max_recommended,price_table_contract_price,price_table_collateral_cost,price_table_max_collateral,price_table_max_duration,price_table_window_size,price_table_registry_entries_left,price_table_registry_entries_total,rhp4_settings_protocol_version,rhp4_settings_release,rhp4_settings_wallet_address,rhp4_settings_accepting_contracts,rhp4_settings_max_collateral,rhp4_settings_max_collateral_duration,rhp4_settings_max_sector_duration,rhp4_settings_max_sector_batch_size,rhp4_settings_remaining_storage,rhp4_settings_total_storage,rhp4_prices_contract_price,rhp4_prices_collateral_price,rhp4_prices_storage_price,rhp4_prices_ingress_price,rhp4_prices_egress_price,rhp4_prices_free_sector_price,rhp4_prices_tip_height,rhp4_prices_valid_until,rhp4_prices_signature FROM host_info WHERE public_key IN (`+queryPlaceHolders(len(pks))+`)`, encoded...)
rows, err := tx.Query(`SELECT public_key,net_address,country_code,known_since,last_scan,last_scan_successful,last_announcement,total_scans,successful_interactions,failed_interactions,settings_accepting_contracts,settings_max_download_batch_size,settings_max_duration,settings_max_revise_batch_size,settings_net_address,settings_remaining_storage,settings_sector_size,settings_total_storage,settings_address,settings_window_size,settings_collateral,settings_max_collateral,settings_base_rpc_price,settings_contract_price,settings_download_bandwidth_price,settings_sector_access_price,settings_storage_price,settings_upload_bandwidth_price,settings_ephemeral_account_expiry,settings_max_ephemeral_account_balance,settings_revision_number,settings_version,settings_release,settings_sia_mux_port,price_table_uid,price_table_validity,price_table_host_block_height,price_table_update_price_table_cost,price_table_account_balance_cost,price_table_fund_account_cost,price_table_latest_revision_cost,price_table_subscription_memory_cost,price_table_subscription_notification_cost,price_table_init_base_cost,price_table_memory_time_cost,price_table_download_bandwidth_cost,price_table_upload_bandwidth_cost,price_table_drop_sectors_base_cost,price_table_drop_sectors_unit_cost,price_table_has_sector_base_cost,price_table_read_base_cost,price_table_read_length_cost,price_table_renew_contract_cost,price_table_revision_base_cost,price_table_swap_sector_base_cost,price_table_write_base_cost,price_table_write_length_cost,price_table_write_store_cost,price_table_txn_fee_min_recommended,price_table_txn_fee_max_recommended,price_table_contract_price,price_table_collateral_cost,price_table_max_collateral,price_table_max_duration,price_table_window_size,price_table_registry_entries_left,price_table_registry_entries_total,rhp4_settings_protocol_version,rhp4_settings_release,rhp4_settings_wallet_address,rhp4_settings_accepting_contracts,rhp4_settings_max_collateral,rhp4_settings_max_contract_duration,rhp4_settings_remaining_storage,rhp4_settings_total_storage,rhp4_prices_contract_price,rhp4_prices_collateral_price,rhp4_prices_storage_price,rhp4_prices_ingress_price,rhp4_prices_egress_price,rhp4_prices_free_sector_price,rhp4_prices_tip_height,rhp4_prices_valid_until,rhp4_prices_signature FROM host_info WHERE public_key IN (`+queryPlaceHolders(len(pks))+`)`, encoded...)
if err != nil {
return err
}
Expand All @@ -108,7 +108,7 @@ func (st *Store) Hosts(pks []types.PublicKey) (result []explorer.Host, err error

s, p := &host.Settings, &host.PriceTable
sV4, pV4 := &host.RHPV4Settings, &host.RHPV4Settings.Prices
if err := rows.Scan(decode(&host.PublicKey), &host.NetAddress, &host.CountryCode, decode(&host.KnownSince), decode(&host.LastScan), &host.LastScanSuccessful, decode(&host.LastAnnouncement), &host.TotalScans, &host.SuccessfulInteractions, &host.FailedInteractions, &s.AcceptingContracts, decode(&s.MaxDownloadBatchSize), decode(&s.MaxDuration), decode(&s.MaxReviseBatchSize), &s.NetAddress, decode(&s.RemainingStorage), decode(&s.SectorSize), decode(&s.TotalStorage), decode(&s.Address), decode(&s.WindowSize), decode(&s.Collateral), decode(&s.MaxCollateral), decode(&s.BaseRPCPrice), decode(&s.ContractPrice), decode(&s.DownloadBandwidthPrice), decode(&s.SectorAccessPrice), decode(&s.StoragePrice), decode(&s.UploadBandwidthPrice), &s.EphemeralAccountExpiry, decode(&s.MaxEphemeralAccountBalance), decode(&s.RevisionNumber), &s.Version, &s.Release, &s.SiaMuxPort, decode(&p.UID), &p.Validity, decode(&p.HostBlockHeight), decode(&p.UpdatePriceTableCost), decode(&p.AccountBalanceCost), decode(&p.FundAccountCost), decode(&p.LatestRevisionCost), decode(&p.SubscriptionMemoryCost), decode(&p.SubscriptionNotificationCost), decode(&p.InitBaseCost), decode(&p.MemoryTimeCost), decode(&p.DownloadBandwidthCost), decode(&p.UploadBandwidthCost), decode(&p.DropSectorsBaseCost), decode(&p.DropSectorsUnitCost), decode(&p.HasSectorBaseCost), decode(&p.ReadBaseCost), decode(&p.ReadLengthCost), decode(&p.RenewContractCost), decode(&p.RevisionBaseCost), decode(&p.SwapSectorBaseCost), decode(&p.WriteBaseCost), decode(&p.WriteLengthCost), decode(&p.WriteStoreCost), decode(&p.TxnFeeMinRecommended), decode(&p.TxnFeeMaxRecommended), decode(&p.ContractPrice), decode(&p.CollateralCost), decode(&p.MaxCollateral), decode(&p.MaxDuration), decode(&p.WindowSize), decode(&p.RegistryEntriesLeft), decode(&p.RegistryEntriesTotal), &protocolVersion, &sV4.Release, decode(&sV4.WalletAddress), &sV4.AcceptingContracts, decode(&sV4.MaxCollateral), decode(&sV4.MaxContractDuration), decode(&sV4.MaxSectorDuration), decode(&sV4.MaxSectorBatchSize), decode(&sV4.RemainingStorage), decode(&sV4.TotalStorage), decode(&pV4.ContractPrice), decode(&pV4.Collateral), decode(&pV4.StoragePrice), decode(&pV4.IngressPrice), decode(&pV4.EgressPrice), decode(&pV4.FreeSectorPrice), decode(&pV4.TipHeight), decode(&pV4.ValidUntil), decode(&pV4.Signature)); err != nil {
if err := rows.Scan(decode(&host.PublicKey), &host.NetAddress, &host.CountryCode, decode(&host.KnownSince), decode(&host.LastScan), &host.LastScanSuccessful, decode(&host.LastAnnouncement), &host.TotalScans, &host.SuccessfulInteractions, &host.FailedInteractions, &s.AcceptingContracts, decode(&s.MaxDownloadBatchSize), decode(&s.MaxDuration), decode(&s.MaxReviseBatchSize), &s.NetAddress, decode(&s.RemainingStorage), decode(&s.SectorSize), decode(&s.TotalStorage), decode(&s.Address), decode(&s.WindowSize), decode(&s.Collateral), decode(&s.MaxCollateral), decode(&s.BaseRPCPrice), decode(&s.ContractPrice), decode(&s.DownloadBandwidthPrice), decode(&s.SectorAccessPrice), decode(&s.StoragePrice), decode(&s.UploadBandwidthPrice), &s.EphemeralAccountExpiry, decode(&s.MaxEphemeralAccountBalance), decode(&s.RevisionNumber), &s.Version, &s.Release, &s.SiaMuxPort, decode(&p.UID), &p.Validity, decode(&p.HostBlockHeight), decode(&p.UpdatePriceTableCost), decode(&p.AccountBalanceCost), decode(&p.FundAccountCost), decode(&p.LatestRevisionCost), decode(&p.SubscriptionMemoryCost), decode(&p.SubscriptionNotificationCost), decode(&p.InitBaseCost), decode(&p.MemoryTimeCost), decode(&p.DownloadBandwidthCost), decode(&p.UploadBandwidthCost), decode(&p.DropSectorsBaseCost), decode(&p.DropSectorsUnitCost), decode(&p.HasSectorBaseCost), decode(&p.ReadBaseCost), decode(&p.ReadLengthCost), decode(&p.RenewContractCost), decode(&p.RevisionBaseCost), decode(&p.SwapSectorBaseCost), decode(&p.WriteBaseCost), decode(&p.WriteLengthCost), decode(&p.WriteStoreCost), decode(&p.TxnFeeMinRecommended), decode(&p.TxnFeeMaxRecommended), decode(&p.ContractPrice), decode(&p.CollateralCost), decode(&p.MaxCollateral), decode(&p.MaxDuration), decode(&p.WindowSize), decode(&p.RegistryEntriesLeft), decode(&p.RegistryEntriesTotal), &protocolVersion, &sV4.Release, decode(&sV4.WalletAddress), &sV4.AcceptingContracts, decode(&sV4.MaxCollateral), decode(&sV4.MaxContractDuration), decode(&sV4.RemainingStorage), decode(&sV4.TotalStorage), decode(&pV4.ContractPrice), decode(&pV4.Collateral), decode(&pV4.StoragePrice), decode(&pV4.IngressPrice), decode(&pV4.EgressPrice), decode(&pV4.FreeSectorPrice), decode(&pV4.TipHeight), decode(&pV4.ValidUntil), decode(&pV4.Signature)); err != nil {
return err
}
sV4.ProtocolVersion = [3]uint8(protocolVersion)
Expand Down
Loading
Loading