@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/legacy.js CHANGED
@@ -28032,7 +28032,7 @@ var EthWeb3Manager = /*#__PURE__*/function () {
28032
28032
  }();
28033
28033
 
28034
28034
  var name = "@audius/sdk";
28035
- var version = "2.0.3-beta.7";
28035
+ var version = "2.0.3-beta.9";
28036
28036
  var audius = {
28037
28037
  releaseSHA: "0a1b8fee5de228d48f2aab265720fbaf45bda661"
28038
28038
  };
@@ -48784,7 +48784,7 @@ var BaseRewardsReporter = /*#__PURE__*/function () {
48784
48784
 
48785
48785
  var MAX_DISBURSED_CACHE_SIZE = 100;
48786
48786
  var SOLANA_EST_SEC_PER_SLOT = 0.5;
48787
- var POA_SEC_PER_BLOCK = 5;
48787
+ var POA_SEC_PER_BLOCK = 1;
48788
48788
  var MAX_DISCOVERY_NODE_BLOCKLIST_LEN = 10;
48789
48789
  /**
48790
48790
  * Class to encapsulate logic for calculating disbursement delay thresholds.
@@ -48802,6 +48802,7 @@ var AttestationDelayCalculator = /*#__PURE__*/function () {
48802
48802
  var libs = _ref.libs,
48803
48803
  runBehindSec = _ref.runBehindSec,
48804
48804
  allowedStalenessSec = _ref.allowedStalenessSec,
48805
+ blockOffset = _ref.blockOffset,
48805
48806
  _ref$solanaPollingInt = _ref.solanaPollingInterval,
48806
48807
  solanaPollingInterval = _ref$solanaPollingInt === void 0 ? 30 : _ref$solanaPollingInt,
48807
48808
  _ref$logger = _ref.logger,
@@ -48818,6 +48819,7 @@ var AttestationDelayCalculator = /*#__PURE__*/function () {
48818
48819
  this.solanaPollingInterval = solanaPollingInterval;
48819
48820
  this.logger = logger;
48820
48821
  this.intervalHandle = null;
48822
+ this.blockOffset = blockOffset;
48821
48823
  }
48822
48824
 
48823
48825
  _createClass(AttestationDelayCalculator, [{
@@ -48901,11 +48903,15 @@ var AttestationDelayCalculator = /*#__PURE__*/function () {
48901
48903
  return _context7.abrupt("return", this.lastPOAThreshold.threshold);
48902
48904
 
48903
48905
  case 2:
48904
- _context7.next = 4;
48906
+ _context7.t0 = Number;
48907
+ _context7.next = 5;
48905
48908
  return this.libs.web3Manager.getWeb3().eth.getBlockNumber();
48906
48909
 
48907
- case 4:
48908
- currentBlock = _context7.sent;
48910
+ case 5:
48911
+ _context7.t1 = _context7.sent;
48912
+ _context7.t2 = (0, _context7.t0)(_context7.t1);
48913
+ _context7.t3 = this.blockOffset;
48914
+ currentBlock = _context7.t2 + _context7.t3;
48909
48915
  threshold = currentBlock - this.runBehindSec / POA_SEC_PER_BLOCK;
48910
48916
  this.lastPOAThreshold = {
48911
48917
  threshold: threshold,
@@ -48913,7 +48919,7 @@ var AttestationDelayCalculator = /*#__PURE__*/function () {
48913
48919
  };
48914
48920
  return _context7.abrupt("return", threshold);
48915
48921
 
48916
- case 8:
48922
+ case 12:
48917
48923
  case "end":
48918
48924
  return _context7.stop();
48919
48925
  }
@@ -49053,7 +49059,8 @@ var RewardsAttester = /*#__PURE__*/function () {
49053
49059
  };
49054
49060
  }() : _ref3$updateStateCall,
49055
49061
  _ref3$maxCooldownMsec = _ref3.maxCooldownMsec,
49056
- maxCooldownMsec = _ref3$maxCooldownMsec === void 0 ? 15000 : _ref3$maxCooldownMsec;
49062
+ maxCooldownMsec = _ref3$maxCooldownMsec === void 0 ? 15000 : _ref3$maxCooldownMsec,
49063
+ blockOffset = _ref3.blockOffset;
49057
49064
 
49058
49065
  _classCallCheck(this, RewardsAttester);
49059
49066
 
@@ -49090,7 +49097,8 @@ var RewardsAttester = /*#__PURE__*/function () {
49090
49097
  libs: libs,
49091
49098
  runBehindSec: runBehindSec,
49092
49099
  logger: logger,
49093
- allowedStalenessSec: 5
49100
+ allowedStalenessSec: 5,
49101
+ blockOffset: blockOffset
49094
49102
  });
49095
49103
  this.isSolanaChallenge = isSolanaChallenge;
49096
49104
  this._performSingleAttestation = this._performSingleAttestation.bind(this);