script: max length. chain: deadbeef fix.
This commit is contained in:
parent
1fc432012d
commit
a6584ae821
@ -447,7 +447,7 @@ Chain.prototype.fromJSON = function fromJSON(json) {
|
||||
if (this.index.bloom)
|
||||
this.index.bloom.reset();
|
||||
else
|
||||
this.index.bloom = new bcoin.bloom(28 * 1024 * 1024, 16, 0xdeadbee0);
|
||||
this.index.bloom = new bcoin.bloom(28 * 1024 * 1024, 16, 0xdeadbeef);
|
||||
|
||||
if (this.index.hashes.length === 0)
|
||||
this.add(new bcoin.block(constants.genesis, 'block'));
|
||||
|
||||
@ -110,6 +110,10 @@ script.subscript = function subscript(s) {
|
||||
};
|
||||
|
||||
script.execute = function execute(s, stack, tx) {
|
||||
if (s.length > 10000) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (var pc = 0; pc < s.length; pc++) {
|
||||
var o = s[pc];
|
||||
if (Array.isArray(o)) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user