Skip to content

Commit

Permalink
updates dockerfile, updates ironfish dependency, updates code breakin… (
Browse files Browse the repository at this point in the history
#53)

* updates dockerfile, updates ironfish dependency, updates code breaking change

* update nodejs version

* reset test files
  • Loading branch information
jowparks authored Mar 20, 2024
1 parent 87bf398 commit 011b3f5
Show file tree
Hide file tree
Showing 6 changed files with 296 additions and 377 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
node-version: '20'

- name: Install dependencies
run: npm install
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ node_modules/
.eslintcache
*-cache*
*testdb*
*yarn-error.log
*yarn-error.log
test/*
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use an official Node.js runtime as the base image
FROM node:18
FROM node:20

# Set the working directory in the container to /app
WORKDIR /app
Expand All @@ -8,9 +8,6 @@ WORKDIR /app
COPY package*.json ./
COPY yarn.lock ./

# Install any needed packages specified in package.json
RUN npm install -g yarn

# Install any needed packages specified in package.json
RUN yarn

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"scripts": {
"dev": "nodemon --config ./nodemon.json --exec 'yarn build && yarn start'",
"lint": "eslint --ext .ts .",
"test": "yarn build && CACHE_PATH='test/cache' BUILD_CACHE=false jest src/* --forceExit --runInBand",
"test": "yarn build && NODE_OPTIONS=\"$NODE_OPTIONS --experimental-vm-modules\" CACHE_PATH='test/cache' BUILD_CACHE=false jest src/* --forceExit --runInBand",
"format": "prettier . --write",
"prebuild": "node bin/proto && rimraf dist",
"tsoa-gen": "tsoa spec-and-routes",
Expand All @@ -25,7 +25,7 @@
"url": "https://github.com/iron-fish/ironfish/issues"
},
"devDependencies": {
"@ironfish/sdk": "^1.8.0",
"@ironfish/sdk": "^2.1.0",
"@types/express": "^4.17.21",
"@types/jest": "^29.5.12",
"@types/leveldown": "^4.0.3",
Expand Down
5 changes: 1 addition & 4 deletions src/utils/lightBlock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@ export function lightBlock(
throw new Error("Block is missing noteSize");
}
const lightTransactions: LightTransaction[] = [];
const previousBlockHash =
"previous" in response.block
? response.block.previous
: response.block.previousBlockHash;
const previousBlockHash = response.block.previousBlockHash;
for (let index = 0; index < response.block.transactions.length; index++) {
const rpcTransaction = response.block.transactions[index];
const lightSpends: LightSpend[] = [];
Expand Down
Loading

0 comments on commit 011b3f5

Please sign in to comment.