@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.
@@ -596,7 +596,7 @@ if (typeof window !== 'undefined' && window && window.Web3) {
596
596
  var LibsWeb3 = Web3;
597
597
 
598
598
  var name = "@audius/sdk";
599
- var version$1 = "2.0.3-beta.7";
599
+ var version$1 = "2.0.3-beta.9";
600
600
  var audius = {
601
601
  releaseSHA: "0a1b8fee5de228d48f2aab265720fbaf45bda661"
602
602
  };
@@ -38307,7 +38307,7 @@ var BaseRewardsReporter = /*#__PURE__*/function () {
38307
38307
 
38308
38308
  var MAX_DISBURSED_CACHE_SIZE = 100;
38309
38309
  var SOLANA_EST_SEC_PER_SLOT = 0.5;
38310
- var POA_SEC_PER_BLOCK = 5;
38310
+ var POA_SEC_PER_BLOCK = 1;
38311
38311
  var MAX_DISCOVERY_NODE_BLOCKLIST_LEN = 10;
38312
38312
  /**
38313
38313
  * Class to encapsulate logic for calculating disbursement delay thresholds.
@@ -38325,6 +38325,7 @@ var AttestationDelayCalculator = /*#__PURE__*/function () {
38325
38325
  var libs = _ref.libs,
38326
38326
  runBehindSec = _ref.runBehindSec,
38327
38327
  allowedStalenessSec = _ref.allowedStalenessSec,
38328
+ blockOffset = _ref.blockOffset,
38328
38329
  _ref$solanaPollingInt = _ref.solanaPollingInterval,
38329
38330
  solanaPollingInterval = _ref$solanaPollingInt === void 0 ? 30 : _ref$solanaPollingInt,
38330
38331
  _ref$logger = _ref.logger,
@@ -38341,6 +38342,7 @@ var AttestationDelayCalculator = /*#__PURE__*/function () {
38341
38342
  this.solanaPollingInterval = solanaPollingInterval;
38342
38343
  this.logger = logger;
38343
38344
  this.intervalHandle = null;
38345
+ this.blockOffset = blockOffset;
38344
38346
  }
38345
38347
 
38346
38348
  _createClass(AttestationDelayCalculator, [{
@@ -38424,11 +38426,15 @@ var AttestationDelayCalculator = /*#__PURE__*/function () {
38424
38426
  return _context7.abrupt("return", this.lastPOAThreshold.threshold);
38425
38427
 
38426
38428
  case 2:
38427
- _context7.next = 4;
38429
+ _context7.t0 = Number;
38430
+ _context7.next = 5;
38428
38431
  return this.libs.web3Manager.getWeb3().eth.getBlockNumber();
38429
38432
 
38430
- case 4:
38431
- currentBlock = _context7.sent;
38433
+ case 5:
38434
+ _context7.t1 = _context7.sent;
38435
+ _context7.t2 = (0, _context7.t0)(_context7.t1);
38436
+ _context7.t3 = this.blockOffset;
38437
+ currentBlock = _context7.t2 + _context7.t3;
38432
38438
  threshold = currentBlock - this.runBehindSec / POA_SEC_PER_BLOCK;
38433
38439
  this.lastPOAThreshold = {
38434
38440
  threshold: threshold,
@@ -38436,7 +38442,7 @@ var AttestationDelayCalculator = /*#__PURE__*/function () {
38436
38442
  };
38437
38443
  return _context7.abrupt("return", threshold);
38438
38444
 
38439
- case 8:
38445
+ case 12:
38440
38446
  case "end":
38441
38447
  return _context7.stop();
38442
38448
  }
@@ -38576,7 +38582,8 @@ var RewardsAttester = /*#__PURE__*/function () {
38576
38582
  };
38577
38583
  }() : _ref3$updateStateCall,
38578
38584
  _ref3$maxCooldownMsec = _ref3.maxCooldownMsec,
38579
- maxCooldownMsec = _ref3$maxCooldownMsec === void 0 ? 15000 : _ref3$maxCooldownMsec;
38585
+ maxCooldownMsec = _ref3$maxCooldownMsec === void 0 ? 15000 : _ref3$maxCooldownMsec,
38586
+ blockOffset = _ref3.blockOffset;
38580
38587
 
38581
38588
  _classCallCheck(this, RewardsAttester);
38582
38589
 
@@ -38613,7 +38620,8 @@ var RewardsAttester = /*#__PURE__*/function () {
38613
38620
  libs: libs,
38614
38621
  runBehindSec: runBehindSec,
38615
38622
  logger: logger,
38616
- allowedStalenessSec: 5
38623
+ allowedStalenessSec: 5,
38624
+ blockOffset: blockOffset
38617
38625
  });
38618
38626
  this.isSolanaChallenge = isSolanaChallenge;
38619
38627
  this._performSingleAttestation = this._performSingleAttestation.bind(this);