From 69fc8047a9a96bcf5360f810c796049c27e16fcd Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 15 Jun 2012 18:52:19 +0200 Subject: Compact serialization for scripts Special serializers for script which detect common cases and encode them much more efficiently. 3 special cases are defined: * Pay to pubkey hash (encoded as 21 bytes) * Pay to script hash (encoded as 21 bytes) * Pay to pubkey starting with 0x02, 0x03 or 0x04 (encoded as 33 bytes) Other scripts up to 121 bytes require 1 byte + script length. Above that, scripts up to 16505 bytes require 2 bytes + script length. --- src/key.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/key.h') diff --git a/src/key.h b/src/key.h index c98f52ed04..2a2723bbee 100644 --- a/src/key.h +++ b/src/key.h @@ -113,9 +113,8 @@ protected: bool fSet; bool fCompressedPubKey; - void SetCompressedPubKey(); - public: + void SetCompressedPubKey(bool fCompressed = true); void Reset(); -- cgit v1.2.3