Skip to content

Commit

Permalink
Rename tbd600 references to arrowhead.
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanieliov authored and marcos-iov committed Dec 11, 2023
1 parent 4c055ef commit 112dd34
Show file tree
Hide file tree
Showing 5 changed files with 354 additions and 295 deletions.
13 changes: 8 additions & 5 deletions lib/precompiled-abi-forks-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const papyrus200Precompiled = require("precompiled-papyrus200");
const iris300Precompiled = require("precompiled-iris300");
const hop400Precompiled = require("precompiled-hop400");
const precompiledFingerroot500 = require("precompiled-fingerroot500");
const precompiledArrowhead600 = require("precompiled-arrowhead600");

const ORCHID = 'orchid';
const WASABI = 'wasabi';
Expand All @@ -13,7 +14,7 @@ const IRIS = 'iris';
const HOP = 'hop';
const HOP401 = 'HOP401';
const FINGERROOT = 'fingerroot';
const ARROWHEAD = 'tbd600';
const ARROWHEAD = 'arrowhead';

// Map to access the pre fork names of certain fork in constant time O(1)
const preForkMap = {
Expand All @@ -38,15 +39,16 @@ const cache = new Map();
*/
const getBridge = (rskClient, forkName = '') => {

const { orchid, wasabi100, papyrus200, iris300, hop400, hop401, fingerroot500, tbd600 } = Runners.common.forks;
const { orchid, wasabi100, papyrus200, iris300, hop400, hop401, fingerroot500, arrowhead600 } = Runners.common.forks;
if(cache.has(forkName)) {
return cache.get(forkName);
}

let bridge;
switch(forkName) {
case arrowhead600.name:
bridge = precompiledArrowhead600.bridge.build(rskClient);
case fingerroot500.name:
case tbd600.name:
bridge = precompiledFingerroot500.bridge.build(rskClient);
break;
case hop400.name:
Expand Down Expand Up @@ -80,10 +82,11 @@ const getBridge = (rskClient, forkName = '') => {
*/
const getBridgeAbi = (forkName) => {

const { orchid, wasabi100, papyrus200, iris300, hop400, hop401, fingerroot500, tbd600 } = Runners.common.forks;
const { orchid, wasabi100, papyrus200, iris300, hop400, hop401, fingerroot500, arrowhead600 } = Runners.common.forks;
switch(forkName) {
case arrowhead600.name:
return precompiledArrowhead600.bridge.abi;
case fingerroot500.name:
case tbd600.name:
return precompiledFingerroot500.bridge.abi;
case hop400.name:
case hop401.name:
Expand Down
Loading

0 comments on commit 112dd34

Please sign in to comment.