This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Transaction { | |
| public: | |
| const int32_t Version; | |
| const uint32_t NumberOfInputs; | |
| const vector<TransactionInput> CollectionOfInputs; | |
| const uint32_t NumberOfOutputs; | |
| const vector<TransactionOutput> CollectionOfOutputs; | |
| const uint32_t LockTimestamp; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class BlockHeader { | |
| public: | |
| int32_t Version; | |
| uint256 PreviousBlockHash; | |
| uint256 MerkleRootHash; | |
| uint32_t Timestamp; | |
| uint32_t TargetToBeSolved; | |
| uint32_t NonceForProofOfWork; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Block { | |
| public: | |
| BlockHeader Header; | |
| vector Transactions; | |
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0x094f3723c13E9ee24de4AEb5b358FdD94D34315C |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # open powershell and execute this file | |
| # let the window open | |
| # if the script won't start because of local execution policy restrictions you can use "Set-Execution-Policy Bypass" | |
| $createdNew = $False; | |
| $mutex = New-Object -TypeName System.Threading.Mutex($true, "MsWinZonesCacheCounterMutexA", [ref]$createdNew); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.store.select(appState => appState.customerState).subscribe(subState => { | |
| const customerInstance = subState.customer; // not an observable but a concrete instance | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| private getCustomerObservable() { | |
| this.customer = getCustomer(this.store); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| this.customerTable.on('select', (e: Event, dt: DataTables.DataTable, | |
| type: string, indexes: number[]) => { | |
| let row: INWCustomer = dt.rows(indexes[0]).data()['0']; | |
| const customer = this.toLocalCustomer(row); | |
| this.store.dispatch(this.customerActions.customerSelected(customer)); | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export function getCustomerState(state$: Observable<IAppState>): Observable<ICustomerState> { | |
| return state$.select(state => state.customerState); | |
| } | |
| export const getCustomer: (obs: Observable<IAppState>) => Observable<ICustomer> = compose(fromSubstates.getCustomer, getCustomerState); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @Injectable() | |
| export class CustomerEffects { | |
| @Effect() customerSelected$: Observable<Action> = this.actions$ | |
| .ofType(CustomerActionTypes.SELECTED) | |
| .map(action => { | |
| let customer: ICustomer = _.cloneDeep(action.payload); | |
| customer.active_debt = this.paymentService.activeDebt(customer.id); | |
| customer.picture = this.imageService.imageUrl(customer.id); | |
| return this.customerActions.customerInitialized(customer); |