From a55cc5c65e24b169bcfe948122ba78b7f489d139 Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Sun, 5 Jul 2015 15:47:30 -0700 Subject: [PATCH] nil validation has zero size --- types/block.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/types/block.go b/types/block.go index 7b52d4b25..d607c2c17 100644 --- a/types/block.go +++ b/types/block.go @@ -224,6 +224,9 @@ func (v *Validation) Type() byte { } func (v *Validation) Size() int { + if v == nil { + return 0 + } return len(v.Precommits) }