Repository navigation
Development - #626
Merged
Merged
Development#626
Conversation
…count Add a regression test that drives UpdateTelemetry() with a state machine whose store Get() always fails, forcing GetAccount() to return a nil account with an error. The test asserts UpdateTelemetry() does not panic; it fails on the current code because the account metric branch dereferences the nil account.
UpdateTelemetry() dropped the error from GetAccount() and dereferenced the returned account directly. GetAccount() returns a nil account together with an error on a store read or unmarshal failure, so the account metric branch could panic with a nil pointer dereference. Add a nil check before reading the account amount, matching the validator metric branch directly above which already guards its result with 'v != nil'.
fix(explorer): restore copy buttons on HTTP origins
chore: delete changelog requirement in contributing guide
…ntroller UpdateTelemetry's new error log (c.log.Errorf) panicked in TestUpdateTelemetryHandlesGetAccountError because the test's minimal Controller never set the log field, leaving it a nil LoggerI. Wire lib.NewNullLogger() the way production controllers always have a logger set.
This reverts commit 3882b29.
fix(controller): guard against nil account in UpdateTelemetry
…ix/global-protobuf-json-hex-sep23
…hex-sep23 Fix/global protobuf json hex sep23
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changelog
v0.1.28+beta
Added
bytesfields are now represented as hex, with recursive transform helpers for native and dynamically registered plugin messages (lib/codec.go).OrdersJSON (un)marshalling that represents reset/close order IDs as hex (lib/certificate.go).copyTextclipboard helper with a fallback for HTTP LAN origins and iOS, plus tests (cmd/rpc/web/explorer/src/lib/clipboard.ts,tests/clipboard.test.cjs).OrdersJSON, and telemetry nil-account handling (lib/codec_test.go,lib/certificate_test.go,controller/block_test.go,fsm/message_test.go).Changed
Transaction.UnmarshalJSONnow decodes registered native messages first, then falls back to protobuf-descriptor decoding and rawAnybytes (lib/tx.go).v0.1.28+beta(cmd/rpc/server.go).CONTRIBUTING.md.Fixed
bytesfields across protobuf/transaction JSON, keeping native and plugin messages consistent (Fix/global protobuf json hex sep23 #624).UpdateTelemetryagainst a nil account fromGetAccount, logging an error instead of dereferencing nil (controller/block.go, fix(controller): guard against nil account in UpdateTelemetry #535).Included PRs