fix: loader report minimum number of signatures required (#535)

This commit is contained in:
Jack May
2019-10-22 15:16:12 -07:00
committed by Michael Vines
parent 227f161243
commit 81c2e8f9c1
3 changed files with 38 additions and 5 deletions

View File

@ -28,6 +28,16 @@ export class Loader {
return PACKET_DATA_SIZE - 300;
}
/**
* Minimum number of signatures required to load a program not including
* retries
*
* Can be used to calculate transaction fees
*/
static getMinNumSignatures(dataLength: number): number {
return Math.ceil(dataLength / Loader.chunkSize);
}
/**
* Loads a generic program
*