gcs/builder: ignore scripts with no data pushes

This commit is contained in:
Olaoluwa Osuntokun 2017-04-27 21:30:10 -07:00
parent b3d8578868
commit 65172ea539

View file

@ -191,6 +191,10 @@ func (b *GCSBuilder) AddScript(script []byte) *GCSBuilder {
// Ignore errors and add pushed data, if any
data, _ := txscript.PushedData(script)
if len(data) == 0 {
return b
}
return b.AddEntries(data)
}