Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/extension.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ async function scanDeployDirectory(session) {
soCount++;

const soPath = path.join(artifactsPath, file);
const hash = crypto.createHash('sha256').update(fs.readFileSync(soPath)).digest('hex'); // TODO(lime): any chance of too big .so files?
// Sync read+hash is fine here: deployed programs are bounded by the
// 10 MiB account data cap (MAX_PERMITTED_DATA_LENGTH), so worst case
// stays in the single-digit ms range.
const hash = crypto.createHash('sha256').update(fs.readFileSync(soPath)).digest('hex');
session.setProgramNameForHash(hash, file);

session.executablesPaths[file] = {
Expand Down