gcs: rename fromData.

This commit is contained in:
Christopher Jeffrey 2017-06-16 16:08:15 -07:00
parent 3324d18f5f
commit 9058e7d78a
No known key found for this signature in database
GPG Key ID: 8962AB9DE6666BBD
2 changed files with 6 additions and 6 deletions

View File

@ -153,7 +153,7 @@ GCSFilter.prototype.toNPBytes = function toNPBytes() {
return data;
};
GCSFilter.prototype.fromData = function fromData(P, key, items) {
GCSFilter.prototype.fromItems = function fromItems(P, key, items) {
var values = [];
var last = Int64(0);
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) {
@ -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) {
return new GCSFilter().fromData(P, key, items);
GCSFilter.fromItems = function fromItems(P, key, items) {
return new GCSFilter().fromItems(P, key, items);
};
GCSFilter.fromBytes = function fromBytes(N, P, data) {

View File

@ -80,7 +80,7 @@ describe('GCS', function() {
addr2 = new Address('bc1q4645ycu0l9pnvxaxnhemushv0w4cd9flkqh95j');
it('should test GCS filter build', function() {
filter1 = GCSFilter.fromData(P, key, contents1);
filter1 = GCSFilter.fromItems(P, key, contents1);
assert(filter1);
});