From 87e8ebbb456487b5b4308fc4bbd4004324a33802 Mon Sep 17 00:00:00 2001 From: Nate Maninger Date: Wed, 31 Jan 2024 16:24:07 -0400 Subject: [PATCH] all: upgrade coreutils and core --- go.mod | 4 ++-- go.sum | 8 ++++---- internal/chain/tpool.go | 2 +- wallet/wallet.go | 18 +++++++++--------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/go.mod b/go.mod index 7d61d5e6..12ae3096 100644 --- a/go.mod +++ b/go.mod @@ -8,8 +8,8 @@ require ( github.com/hashicorp/golang-lru/v2 v2.0.5 github.com/mattn/go-sqlite3 v1.14.17 gitlab.com/NebulousLabs/encoding v0.0.0-20200604091946-456c3dc907fe - go.sia.tech/core v0.2.1-0.20240124010156-3ffae341852c - go.sia.tech/coreutils v0.0.0-20240125145741-0f35c5ee74a8 + go.sia.tech/core v0.2.1 + go.sia.tech/coreutils v0.0.1 go.sia.tech/jape v0.11.2-0.20240124024603-93559895d640 go.sia.tech/renterd v0.6.0 go.sia.tech/siad v1.5.10-0.20230228235644-3059c0b930ca diff --git a/go.sum b/go.sum index 51f68a88..684b080f 100644 --- a/go.sum +++ b/go.sum @@ -233,10 +233,10 @@ gitlab.com/NebulousLabs/threadgroup v0.0.0-20200608151952-38921fbef213 h1:owERlK gitlab.com/NebulousLabs/threadgroup v0.0.0-20200608151952-38921fbef213/go.mod h1:vIutAvl7lmJqLVYTCBY5WDdJomP+V74At8LCeEYoH8w= gitlab.com/NebulousLabs/writeaheadlog v0.0.0-20200618142844-c59a90f49130/go.mod h1:SxigdS5Q1ui+OMgGAXt1E/Fg3RB6PvKXMov2O3gvIzs= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= -go.sia.tech/core v0.2.1-0.20240124010156-3ffae341852c h1:hFgv4uH2+wf838W7V0dIVgldjMyje2dkZcCLItu874g= -go.sia.tech/core v0.2.1-0.20240124010156-3ffae341852c/go.mod h1:3EoY+rR78w1/uGoXXVqcYdwSjSJKuEMI5bL7WROA27Q= -go.sia.tech/coreutils v0.0.0-20240125145741-0f35c5ee74a8 h1:YsZL34F4Z7QSF4r9zf+oBMjBJlGfQDGfn3YHKX4qfro= -go.sia.tech/coreutils v0.0.0-20240125145741-0f35c5ee74a8/go.mod h1:0brl203MK8CpLfWZ7AlJQ6/l5p8Ux8bzguSVXQ4Irwg= +go.sia.tech/core v0.2.1 h1:CqmMd+T5rAhC+Py3NxfvGtvsj/GgwIqQHHVrdts/LqY= +go.sia.tech/core v0.2.1/go.mod h1:3EoY+rR78w1/uGoXXVqcYdwSjSJKuEMI5bL7WROA27Q= +go.sia.tech/coreutils v0.0.1 h1:Th8iiF9fjkBaxlKRgPJfRtsD3Pb8U4d2m/OahB6wffg= +go.sia.tech/coreutils v0.0.1/go.mod h1:3Mb206QDd3NtRiaHZ2kN87/HKXhcBF6lHVatS7PkViY= go.sia.tech/jape v0.11.2-0.20240124024603-93559895d640 h1:mSaJ622P7T/M97dAK8iPV+IRIC9M5vV28NHeceoWO3M= go.sia.tech/jape v0.11.2-0.20240124024603-93559895d640/go.mod h1:4QqmBB+t3W7cNplXPj++ZqpoUb2PeiS66RLpXmEGap4= go.sia.tech/mux v1.2.0 h1:ofa1Us9mdymBbGMY2XH/lSpY8itFsKIo/Aq8zwe+GHU= diff --git a/internal/chain/tpool.go b/internal/chain/tpool.go index 9b3597c2..efb1bb67 100644 --- a/internal/chain/tpool.go +++ b/internal/chain/tpool.go @@ -14,7 +14,7 @@ type TransactionPool struct { // RecommendedFee returns the recommended fee per byte. func (tp *TransactionPool) RecommendedFee() (fee types.Currency) { _, max := tp.tp.FeeEstimation() - convertToCore(&max, &fee) + convertToCore(&max, (*types.V1Currency)(&fee)) return } diff --git a/wallet/wallet.go b/wallet/wallet.go index 8edeb40e..ae1371a7 100644 --- a/wallet/wallet.go +++ b/wallet/wallet.go @@ -126,8 +126,8 @@ func (txn Transaction) EncodeTo(e *types.Encoder) { txn.ID.EncodeTo(e) txn.Index.EncodeTo(e) txn.Transaction.EncodeTo(e) - txn.Inflow.EncodeTo(e) - txn.Outflow.EncodeTo(e) + (*types.V1Currency)(&txn.Inflow).EncodeTo(e) + (*types.V1Currency)(&txn.Outflow).EncodeTo(e) e.WriteString(string(txn.Source)) e.WriteTime(txn.Timestamp) } @@ -137,8 +137,8 @@ func (txn *Transaction) DecodeFrom(d *types.Decoder) { txn.ID.DecodeFrom(d) txn.Index.DecodeFrom(d) txn.Transaction.DecodeFrom(d) - txn.Inflow.DecodeFrom(d) - txn.Outflow.DecodeFrom(d) + (*types.V1Currency)(&txn.Inflow).DecodeFrom(d) + (*types.V1Currency)(&txn.Outflow).DecodeFrom(d) txn.Source = TransactionSource(d.ReadString()) txn.Timestamp = d.ReadTime() } @@ -570,7 +570,7 @@ func (sw *SingleAddressWallet) ProcessConsensusChange(cc modules.ConsensusChange } // append the payout transaction to the diff var utxo types.SiacoinOutput - convertToCore(dsco.SiacoinOutput, &utxo) + convertToCore(dsco.SiacoinOutput, (*types.V1SiacoinOutput)(&utxo)) sce := SiacoinElement{ ID: types.SiacoinOutputID(dsco.ID), SiacoinOutput: utxo, @@ -584,7 +584,7 @@ func (sw *SingleAddressWallet) ProcessConsensusChange(cc modules.ConsensusChange for _, diff := range applied.SiacoinOutputDiffs { if diff.Direction == modules.DiffRevert { var so types.SiacoinOutput - convertToCore(diff.SiacoinOutput, &so) + convertToCore(diff.SiacoinOutput, (*types.V1SiacoinOutput)(&so)) spentOutputs[types.SiacoinOutputID(diff.ID)] = so } } @@ -607,7 +607,7 @@ func (sw *SingleAddressWallet) ProcessConsensusChange(cc modules.ConsensusChange } if diff.Direction == modules.DiffApply { var sco types.SiacoinOutput - convertToCore(diff.SiacoinOutput, &sco) + convertToCore(diff.SiacoinOutput, (*types.V1SiacoinOutput)(&sco)) err := tx.AddSiacoinElement(SiacoinElement{ SiacoinOutput: sco, ID: types.SiacoinOutputID(diff.ID), @@ -643,7 +643,7 @@ func (sw *SingleAddressWallet) ProcessConsensusChange(cc modules.ConsensusChange } var value types.Currency - convertToCore(sco.SiacoinOutput.Value, &value) + convertToCore(sco.SiacoinOutput.Value, (*types.V1Currency)(&value)) switch sco.Direction { case modules.DiffApply: if err := tx.AddWalletDelta(value, blockTimestamp); err != nil { @@ -667,7 +667,7 @@ func (sw *SingleAddressWallet) ProcessConsensusChange(cc modules.ConsensusChange } var value types.Currency - convertToCore(sco.SiacoinOutput.Value, &value) + convertToCore(sco.SiacoinOutput.Value, (*types.V1Currency)(&value)) switch sco.Direction { case modules.DiffApply: if err := tx.AddWalletDelta(value, blockTimestamp); err != nil {