Avoid a bunch of copying/conversion in script/sign
Merge pull request #5210

1f84793 Avoid a bunch of copying/conversion in script/sign (Pieter Wuille)
Adding const.
Merge pull request #5249

38c62ae Adding const. (sinetek)