From 3b9bcb378dd971cdeccb80ef0a37fa566a891ebb Mon Sep 17 00:00:00 2001 From: Philip Stanislaus <6912756+philipstanislaus@users.noreply.github.com> Date: Thu, 30 Jan 2020 21:02:23 +0100 Subject: [PATCH] Update documentation --- README.md | 2 +- types/event_record.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 3972996d2..56d9b030a 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This client is modelled after [polkadot-js/api](https://github.com/polkadot-js/a ## State -This package is actively developed. The first stable release is expected in November 2019. +This package is feature complete, but it is relatively new and might still contain bugs. We advice to use it with caution in production. It comes without any warranties, please refer to LICENCE for details. ## Documentation & Usage Examples diff --git a/types/event_record.go b/types/event_record.go index 98589a01f..b701609aa 100644 --- a/types/event_record.go +++ b/types/event_record.go @@ -293,6 +293,9 @@ type EventRecords struct { } // DecodeEventRecords decodes the events records from an EventRecordRaw into a target t using the given Metadata m +// If this method returns an error like `unable to decode Phase for event #x: EOF`, it is likely that you have defined +// a custom event record with a wrong type. For example your custom event record has a field with a length prefixed +// type, such as types.Bytes, where your event in reallity contains a fixed width type, such as a types.U32. func (e EventRecordsRaw) DecodeEventRecords(m *Metadata, t interface{}) error { log.Debug(fmt.Sprintf("will decode event records from raw hex: %#x", e))