-
-
Save fjl/10f4b78e54b2ad7113a1b95e3fcaebcd to your computer and use it in GitHub Desktop.
This file contains 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
diff --git a/rlp/encode.go b/rlp/encode.go | |
index c3523369f..404202418 100644 | |
--- a/rlp/encode.go | |
+++ b/rlp/encode.go | |
@@ -399,7 +399,8 @@ func makeEncoderWriter(typ reflect.Type) writer { | |
// package json simply doesn't call MarshalJSON for this case, but encodes the | |
// value as if it didn't implement the interface. We don't want to handle it that | |
// way. | |
- return fmt.Errorf("rlp: unadressable value of type %v, EncodeRLP is pointer method", val.Type()) | |
+ panic(fmt.Errorf("rlp: unadressable value of type %v, EncodeRLP is pointer method", val.Type())) | |
+ return nil | |
} | |
return val.Addr().Interface().(Encoder).EncodeRLP(w) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment