gcs: rename fromData.
This commit is contained in:
parent
3324d18f5f
commit
9058e7d78a
@ -153,7 +153,7 @@ GCSFilter.prototype.toNPBytes = function toNPBytes() {
|
|||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
||||||
GCSFilter.prototype.fromData = function fromData(P, key, items) {
|
GCSFilter.prototype.fromItems = function fromItems(P, key, items) {
|
||||||
var values = [];
|
var values = [];
|
||||||
var last = Int64(0);
|
var last = Int64(0);
|
||||||
var i, bw, item, hash, value, rem;
|
var i, bw, item, hash, value, rem;
|
||||||
@ -276,7 +276,7 @@ GCSFilter.prototype.fromBlock = function fromBlock(block) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.fromData(20, key, items);
|
return this.fromItems(20, key, items);
|
||||||
};
|
};
|
||||||
|
|
||||||
GCSFilter.prototype.fromExtended = function fromExtended(block) {
|
GCSFilter.prototype.fromExtended = function fromExtended(block) {
|
||||||
@ -299,11 +299,11 @@ GCSFilter.prototype.fromExtended = function fromExtended(block) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.fromData(20, key, items);
|
return this.fromItems(20, key, items);
|
||||||
};
|
};
|
||||||
|
|
||||||
GCSFilter.fromData = function fromData(P, key, items) {
|
GCSFilter.fromItems = function fromItems(P, key, items) {
|
||||||
return new GCSFilter().fromData(P, key, items);
|
return new GCSFilter().fromItems(P, key, items);
|
||||||
};
|
};
|
||||||
|
|
||||||
GCSFilter.fromBytes = function fromBytes(N, P, data) {
|
GCSFilter.fromBytes = function fromBytes(N, P, data) {
|
||||||
|
|||||||
@ -80,7 +80,7 @@ describe('GCS', function() {
|
|||||||
addr2 = new Address('bc1q4645ycu0l9pnvxaxnhemushv0w4cd9flkqh95j');
|
addr2 = new Address('bc1q4645ycu0l9pnvxaxnhemushv0w4cd9flkqh95j');
|
||||||
|
|
||||||
it('should test GCS filter build', function() {
|
it('should test GCS filter build', function() {
|
||||||
filter1 = GCSFilter.fromData(P, key, contents1);
|
filter1 = GCSFilter.fromItems(P, key, contents1);
|
||||||
assert(filter1);
|
assert(filter1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user