@audius/sdk 2.0.3-beta.7 → 2.0.3-beta.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs.js CHANGED
@@ -28224,7 +28224,7 @@ var EthWeb3Manager = /*#__PURE__*/function () {
28224
28224
  }();
28225
28225
 
28226
28226
  var name = "@audius/sdk";
28227
- var version = "2.0.3-beta.7";
28227
+ var version = "2.0.3-beta.9";
28228
28228
  var audius = {
28229
28229
  releaseSHA: "0a1b8fee5de228d48f2aab265720fbaf45bda661"
28230
28230
  };
@@ -48976,7 +48976,7 @@ var BaseRewardsReporter = /*#__PURE__*/function () {
48976
48976
 
48977
48977
  var MAX_DISBURSED_CACHE_SIZE = 100;
48978
48978
  var SOLANA_EST_SEC_PER_SLOT = 0.5;
48979
- var POA_SEC_PER_BLOCK = 5;
48979
+ var POA_SEC_PER_BLOCK = 1;
48980
48980
  var MAX_DISCOVERY_NODE_BLOCKLIST_LEN = 10;
48981
48981
  /**
48982
48982
  * Class to encapsulate logic for calculating disbursement delay thresholds.
@@ -48994,6 +48994,7 @@ var AttestationDelayCalculator = /*#__PURE__*/function () {
48994
48994
  var libs = _ref.libs,
48995
48995
  runBehindSec = _ref.runBehindSec,
48996
48996
  allowedStalenessSec = _ref.allowedStalenessSec,
48997
+ blockOffset = _ref.blockOffset,
48997
48998
  _ref$solanaPollingInt = _ref.solanaPollingInterval,
48998
48999
  solanaPollingInterval = _ref$solanaPollingInt === void 0 ? 30 : _ref$solanaPollingInt,
48999
49000
  _ref$logger = _ref.logger,
@@ -49010,6 +49011,7 @@ var AttestationDelayCalculator = /*#__PURE__*/function () {
49010
49011
  this.solanaPollingInterval = solanaPollingInterval;
49011
49012
  this.logger = logger;
49012
49013
  this.intervalHandle = null;
49014
+ this.blockOffset = blockOffset;
49013
49015
  }
49014
49016
 
49015
49017
  _createClass(AttestationDelayCalculator, [{
@@ -49093,11 +49095,15 @@ var AttestationDelayCalculator = /*#__PURE__*/function () {
49093
49095
  return _context7.abrupt("return", this.lastPOAThreshold.threshold);
49094
49096
 
49095
49097
  case 2:
49096
- _context7.next = 4;
49098
+ _context7.t0 = Number;
49099
+ _context7.next = 5;
49097
49100
  return this.libs.web3Manager.getWeb3().eth.getBlockNumber();
49098
49101
 
49099
- case 4:
49100
- currentBlock = _context7.sent;
49102
+ case 5:
49103
+ _context7.t1 = _context7.sent;
49104
+ _context7.t2 = (0, _context7.t0)(_context7.t1);
49105
+ _context7.t3 = this.blockOffset;
49106
+ currentBlock = _context7.t2 + _context7.t3;
49101
49107
  threshold = currentBlock - this.runBehindSec / POA_SEC_PER_BLOCK;
49102
49108
  this.lastPOAThreshold = {
49103
49109
  threshold: threshold,
@@ -49105,7 +49111,7 @@ var AttestationDelayCalculator = /*#__PURE__*/function () {
49105
49111
  };
49106
49112
  return _context7.abrupt("return", threshold);
49107
49113
 
49108
- case 8:
49114
+ case 12:
49109
49115
  case "end":
49110
49116
  return _context7.stop();
49111
49117
  }
@@ -49245,7 +49251,8 @@ var RewardsAttester = /*#__PURE__*/function () {
49245
49251
  };
49246
49252
  }() : _ref3$updateStateCall,
49247
49253
  _ref3$maxCooldownMsec = _ref3.maxCooldownMsec,
49248
- maxCooldownMsec = _ref3$maxCooldownMsec === void 0 ? 15000 : _ref3$maxCooldownMsec;
49254
+ maxCooldownMsec = _ref3$maxCooldownMsec === void 0 ? 15000 : _ref3$maxCooldownMsec,
49255
+ blockOffset = _ref3.blockOffset;
49249
49256
 
49250
49257
  _classCallCheck(this, RewardsAttester);
49251
49258
 
@@ -49282,7 +49289,8 @@ var RewardsAttester = /*#__PURE__*/function () {
49282
49289
  libs: libs,
49283
49290
  runBehindSec: runBehindSec,
49284
49291
  logger: logger,
49285
- allowedStalenessSec: 5
49292
+ allowedStalenessSec: 5,
49293
+ blockOffset: blockOffset
49286
49294
  });
49287
49295
  this.isSolanaChallenge = isSolanaChallenge;
49288
49296
  this._performSingleAttestation = this._performSingleAttestation.bind(this);