mirror of
https://github.com/luxfi/netrunner.git
synced 2026-07-27 00:04:23 +00:00
netrunner/local: use sdk pwallet.Codec for proto/p tx parsing
proto/p Wave 2A (#101) rips github.com/luxfi/codec from p/txs — the package-level txs.Codec singleton is gone. local/blockchain.go's newWallet was using it to parse PChain wire bytes; switch to sdk/wallet/chain/p.Codec (already imported as pwallet in the same file), which is the canonical linearcodec-backed codec.Manager constructed by the sdk's wallet/chain/p init(). This is a one-line cascade fix — no new helper needed because the SDK already exposes the codec we'd construct here anyway. go build ./... green. The proto pin remains at v1.1.0; the workspace go.work consumes the local proto/ which is on branch chore/proto-p-codec-rip with the new API. This commit goes live once proto v1.2.0 + sdk v?.?.? are tagged.
This commit is contained in:
+1
-1
@@ -1378,7 +1378,7 @@ func newWallet(
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to get tx %s: %w", id, err)
|
||||
}
|
||||
tx, err := txs.Parse(txs.Codec, txBytes)
|
||||
tx, err := txs.Parse(pwallet.Codec, txBytes)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user